1. WS_CHILD

How come when i create a child window like this,

constant 
     WIN = create( Window, "Parent", 0,0,300,300,0),
     CHILD = create( Window, "Child", 10,10,100,100, WS_CHILD)

and then open the child window, the child window looks like it isn't 
active?(The top bar is gray)  Is there a way to make the window active?

new topic     » topic index » view message » categorize

2. Re: WS_CHILD

>
> How come when i create a child window like this,
>
> constant
>      WIN = create( Window, "Parent", 0,0,300,300,0),
>      CHILD = create( Window, "Child", 10,10,100,100, WS_CHILD)
>
> and then open the child window, the child window looks like it isn't
> active?(The top bar is gray)  Is there a way to make the window active?

Hi Jon,
I've been trying a number of different ways to activate the CHILD windows
but without success. it appears that Windows does not allow child windows
created in this manner to have an "active" caption bar.

It maybe that you should investigate the MDI (Multiple Document Interface)
style of programs that does allows this sort of thing. I did a short study
and it doesn't look trivial. This style of interface is losing favour
amongst UI specialists so you might want to rethink your design in the light
of this.

------
Derek.

new topic     » goto parent     » topic index » view message » categorize

3. Re: WS_CHILD

I don't seem to have this problem. Here's some code snipits which I've been
using and the window opens with focus and a blue bar like it should when it
has the focus.

global procedure pickTermsInit()
 wx = 300
 wy = 250
 wl = 207
 wh = 160
 winIdTerms = create(Window,"",grpActive,wx,wy,wl,wh,0)    <---- grpActive
is the parent window
 pickField[fldCount] = {winIdTerms,routine_id("pickTerms")}
 idTerms = create(List,"",winIdTerms,0,0,200,100,#82)
 pickIndex[fldCount] = {idTerms,fldCount}
 pkOkTerms = create(Button,"OK",winIdTerms,50,105,50,25,0)
 onClick[pkOkTerms] = routine_id("getCode")
 pkCanTerms = create(Button,"Cancel",winIdTerms,100,105,50,25,0)
 onClick[pkCanTerms] = routine_id("exitRoutine")
end procedure

global procedure pickTerms ()
 typ = "T"
 who = getWhoami()
 win = winIdTerms
 list = idTerms
 loadCodes(typ,idTerms)
 openWindow(winIdTerms,Normal)
end procedure

...george
----- Original Message -----
From: "Derek Parnell" <ddparnell at bigpond.com>
To: "EUforum" <EUforum at topica.com>
Sent: Thursday, August 23, 2001 5:04 PM
Subject: Re: WS_CHILD


> >
> >
> > How come when i create a child window like this,
> >
> > constant
> >      WIN = create( Window, "Parent", 0,0,300,300,0),
> >      CHILD = create( Window, "Child", 10,10,100,100, WS_CHILD)
> >
> > and then open the child window, the child window looks like it isn't
> > active?(The top bar is gray)  Is there a way to make the window active?
>
> Hi Jon,
> I've been trying a number of different ways to activate the CHILD windows
> but without success. it appears that Windows does not allow child windows
> created in this manner to have an "active" caption bar.
>
> It maybe that you should investigate the MDI (Multiple Document Interface)
> style of programs that does allows this sort of thing. I did a short study
> and it doesn't look trivial. This style of interface is losing favour
> amongst UI specialists so you might want to rethink your design in the
light
> of this.
>
> ------
> Derek.
>
> >
> >
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: WS_CHILD

From: George Walters <gwalters at sc.rr.com>
> To: EUforum <EUforum at topica.com>
> Reply-To: EUforum at topica.com
> Subject: Re: WS_CHILD
> Date: 24/08/2001 8:30:03 AM
> 
> 
> I don't seem to have this problem. Here's 
> some code snipits which I've been
> using and the window opens with focus and 
> a blue bar like it should when it
> has the focus.
> 
> global procedure pickTermsInit()
>  wx = 300
>  wy = 250
>  wl = 207
>  wh = 160
>  winIdTerms = create
> (Window,"",grpActive,wx,wy,wl,wh,0)    
> <---- grpActive
> is the parent window
>  pickField[fldCount] = 
> {winIdTerms,routine_id("pickTerms")}
>  idTerms = create
> (List,"",winIdTerms,0,0,200,100,#82)
>  pickIndex[fldCount] = {idTerms,fldCount}
>  pkOkTerms = create
> (Button,"OK",winIdTerms,50,105,50,25,0)
>  onClick[pkOkTerms] = routine_id
> ("getCode")
>  pkCanTerms = create
> (Button,"Cancel",winIdTerms,100,105,50,25,
> 0)
>  onClick[pkCanTerms] = routine_id
> ("exitRoutine")
> end procedure
> 
> global procedure pickTerms ()
>  typ = "T"
>  who = getWhoami()
>  win = winIdTerms
>  list = idTerms
>  loadCodes(typ,idTerms)
>  openWindow(winIdTerms,Normal)
> end procedure
> 
> ...george

Hi George,
the difference is that the code you use does not have the WS_CHILD flag. The
use of this flag causes the child window to remain inside the parent
window's borders. Technically, your use does create a child window, but not
the same sort of child window that was being attempted.
-----
Derek


confidential information intended solely for the use of the individual or
entity to whom they are addressed. If you are not the intended recipient of
this message you are hereby notified that any use, dissemination,
distribution or reproduction of this message is prohibited. If you have
received this message in error please notify the sender immediately. Any
views expressed in this message are those of the individual sender and may
not necessarily reflect the views of Global Technology Australasia Limited.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu