Re: child windows not receiving focus events?

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

Nope, that didn't work. But I can't believe the solution didn't reach out of
the monitor and slap me in the face! All I did was test for any mouse event
except MouseMove and call setFocus() for the right window. I'm sure I could
test for some type of keyboard input, too.

procedure SetFocusHandler( integer pSelf, integer pEvent, sequence pParams )

    if pParams[1] != MouseMove then
        setFocus( pSelf )
    end if

end procedure
setHandler( MyWin, w32HMouse, routine_id("SetFocusHandler") )



----- Original Message -----
From: "Derek Parnell" <guest at RapidEuphoria.com>
To: <EUforum at topica.com>
Sent: Tuesday, July 13, 2004 4:08 PM
Subject: RE: child windows not receiving focus events?


>
>
> posted by: Derek Parnell <ddparnell at bigpond.com>
>
> Try these two patches in the win32lib to see if it helps..
>
> --- Patch #1 ---
> Find the routine "tab_direction()" and replace the lines ...
>
>     if  window_family[id] = WINDOW  or find(window_type[id],{ TabItem})
then
>         -- parent is self
>         parent = id
>
>
> with ...
>
>     if  find(window_type[id],{ TabItem}) then
>         -- parent is self
>         parent = id
>
>     elsif window_family[id] = WINDOW and window_owner[id] = 0 then
>         -- parent is self
>         parent = id
>
> --- Patch #2 ---
> In the routine createWindow(), replace the lines ...
>
>     if owner != 0 and  and_bits(WS_VISIBLE, lFlags) then
>         call_proc(r_openWindow, {id, Normal})
>     end if
>
>
> with ...
>
>     if owner != 0 then
>         if  and_bits(WS_VISIBLE, lFlags) then
>             call_proc(r_openWindow, {id, Normal})
>         end if
>
>         if and_bits( WS_TABSTOP, lFlags ) then
>             -- add to the owner's focus_order list
>             window_focus_order[owner] &= id
>         end if
>
>     end if
>
>
> Then all you have to do is create your child window with the
> WS_TABSTOP flag included.
>
> --
> Derek Parnell
> Melbourne, Australia
>
>
>
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu