Here's an example how another window's view can be
made a child of a given window's view.
BTW, wd 'qhwndp' return the view, then GetParent returns its window.
This may crash and exposes some interesting behavior:
the OK button of the embedded other view invokes
Toggle button event of the current view.
NB. =========================================================
F=: 0 : 0
pc f;pn "Main";
xywh 159 92 37 10;cc s1 static;cn "Main Form";
xywh 160 10 34 11;cc toggle button;cn "Toggle";
pas 6 6;pmove 55 61 205 122;
rem form end;
)
f_run=: 3 : 0
wd F
HWNDP=: HWNDF=: 0".wd 'qhwndp'
wd 'pshow;'
g_run ''
)
f_close=: 3 : 0
g_dispose''
wd 'psel ',":HWNDF
wd 'pclose'
)
f_toggle_button=: 3 : 0
wd 'psel ',":HWNDG
wd 'pshow ',(HWNDP=HWNDF) {:: ;:'sw_show sw_hide'
HWNDP=: SetParent HWNDG;HWNDP
)
NB. =========================================================
G=: 0 : 0
pc g;pn "Child";
xywh 18 79 50 10;cc s2 static;cn "Child Form";
xywh 86 18 34 11;cc ok button;cn "OK";
xywh 9 5 119 90;cc g1 groupbox;cn "Child";
pas 6 6;pmove 291 62 137 115;
rem form end;
)
g_run=: 3 : 0
wd G
HWNDG=: 0".wd 'qhwndp'
wd 'pshow;'
)
g_dispose=: 3 : 0
wd 'psel ',":HWNDG
wd 'pclose'
)
SetParent=: 'user32 SetParent > i i i'&(15!:0)
NB. =========================================================
f_run''
----- Original Message ----
From: Alex Rufon <[EMAIL PROTECTED]>
To: Programming forum <[email protected]>
Sent: Wednesday, August 2, 2006 11:32:00 PM
Subject: RE: [Jprogramming] How do i Maximized the J window using the"wd"command
Hello Oleg,
Thanks for the info on "borderless" script. I'll look into it. :)
Btw, I did find out about the frame window and the view window. You see
I used the Win32 API FindWindow, SetParent, SetWindow and MoveWindow to
hijack the J Session and make a picture box its parent. ;) What I did
found out is that you can't hijack the view window ... only the frame
window. I tried using Spy++ to find out the window name and it still
wouldn't work. So I just settled with the whole J window embedded in my
application.
r/Alex
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Oleg Kobchenko
Sent: Thursday, August 03, 2006 5:11 AM
To: Programming forum
Subject: Re: [Jprogramming] How do i Maximized the J window using
the"wd"command
You may wanna look at the approach taken in
the "borderless" script at
http://olegykj.sourceforge.net/
It's now updated for j601.
Also, J form consists of two parts: the frame window,
and the view window. What you want to use in the
IDE dockable host is the inner view.
See if you could hijack it from MFC.
----- Original Message ----
From: Alex Rufon <[EMAIL PROTECTED]>
To: Programming forum <[email protected]>
Sent: Wednesday, August 2, 2006 5:28:01 AM
Subject: RE: [Jprogramming] How do i Maximized the J window using the
"wd"command
Im resending with link to image -->
http://static.flickr.com/68/204698032_ca1626c876.jpg?v=0
Did I miss an announcement regarding attachments in the list?
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alex Rufon
Sent: Wednesday, August 02, 2006 5:09 PM
To: Programming forum
Subject: [Jprogramming] How do i Maximized the J window using the
"wd"command
Hello.
I'm working on an in-house J IDE (please see attached image) where I
embed J into a .NET form.
The problem with this is that the J Window itself can be resize and
mucks up the "resize" event. I use the following code to show the J
window
NB. =========================================================
JIJX=: 0 : 0
pc pjijx;
xywh 0 0 250 150;cc e editijx ws_hscroll ws_vscroll es_nohidesel
rightmove bottommove;
pas 0 0;
rem form end;
)
NB. =========================================================
showJ=: 3 : 0
if. 1 e. 'jijx' E. wd 'qpx' do. return. end.
create''
)
NB. =========================================================
create=: 3 : 0
wd JIJX
wd 'pn *',pname''
wd 'setfont e "Lucida Console" 11 oem'
wd 'pshow'
)
NB. =========================================================
pname=: 3 : 0
'Session Server'
)
So my question is, what do I change to open the window Maximized and how
to I remove the Minimize, Maximize/Restore and Close button on the upper
right hand corner of the J window?
Thanks for any help.
r/Alex
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm