1. RE: WS_CHILD
- Posted by Jonas Temple <jktemple at yhti.net> Aug 23, 2001
- 445 views
Jon Snyder wrote: > 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? Jon, This might be a hack but after I use openWindow to open a child window I immediately use setFocus to set the focus to the child window. That seems to do the trick. Jonas
2. RE: WS_CHILD
- Posted by Jon Snyder <jongsnyder at hotmail.com> Aug 23, 2001
- 429 views
Jonas Temple wrote: > > Jon Snyder wrote: > > 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? > Jon, > > This might be a hack but after I use openWindow to open a child window I > > immediately use setFocus to set the focus to the child window. That > seems to do the trick. > > Jonas > Jonas, I tried using setFocus right after creating it with no luck. I'm using version 0.55.1 of Win32Lib. What is weird though is that if i maximize the child window the top bar will flash the blue color of an active window but then go back to gray. Is this an error in win32lib? Jon
3. RE: WS_CHILD
- Posted by Jonas Temple <jktemple at yhti.net> Aug 23, 2001
- 454 views
Jon Snyder wrote: > I tried using setFocus right after creating it with no luck. I'm using > version 0.55.1 of Win32Lib. What is weird though is that if i maximize > the child window the top bar will flash the blue color of an active > window but then go back to gray. Is this an error in win32lib? > > Jon Jon, Now looking back, from your example you had the create routines coded as : WIN = create( Window, "Parent", 0,0,300,300,0), CHILD = create( Window, "Child", 10,10,100,100, WS_CHILD) In reality the create routine is defined as: create( Window, "Title", parent, x, y, width, height, flags) Is your example an exact quote from your program? I am assuming not. Any way, you might try the following change to your parent/child relationship (not I added the parent parm to your example): WIN = create( Window, "Parent", 0, 0,0,300,300,0), CHILD = create( Window, "Child", WIN, 10,10,100,100, {WS_THICKFRAME} ) The WS_THICKFRAME gives the child window a nice raised window appearance. Jonas