Re: Global variables for multiple child windows

new topic     » goto parent     » topic index » view thread      » older message » newer message

Rad wrote:
> 
> CChris wrote:
> > I assume you are using win32lib:
> > }}}
<eucode>
> > constant GW_CHILD = 5
> > 
> >
> > myTopChildWindow=getId(w32Func(xGetWindow,{getHandle(myMainWindow),GW_CHILD}))
> > </eucode>
{{{

> > If you don't, check that the GetWindow API is being wrapped, and wrap it if
> > needed. It's wrapped in win32lib as
> > }}}
<eucode>    xGetWindow          = registerw32Function( user32, "GetWindow",
> > {C_LONG,
> > C_LONG}, C_LONG)</eucode>
{{{

> > 
> 
> Thanks CChris. I got it working with your syntax and combination of
> {w32GotFocus,
> w32Resize, w32Mouse}.
> 
> I have one query though.
> 
> When a window title is clicked, I am getting that window to be topmost.
> But the handler set for GotFocus is not invoked.
> I have to click within that window to invoke GotFocus.
> Why so? Isn't getting the window to foreground setting focus on that window?
> 
> Regards,
> Rad.

No, because if you click in the non client area of a window, the latter will get
a WM_NCLBUTTONDOWN message instead of WM_LBUTTONDOWN etc. And the library
currently doesn't care about these non client mouse messages. You can always trap
WM_NCLBUTTONDOWN (registering the handler using setWinMsgHandler()) and fire the
w32HGotFocus event from there, if you wish.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu