1. RE: child windows not receiving focus events?
- Posted by Brian Broker <bkb at cnw.com> Jul 12, 2004
- 601 views
irv mullins wrote: > > > posted by: irv mullins <irvm at ellijay.com> > > Greg Haberek wrote: > > > > M#0II;F-L=61E(%=I;C,R3&EB+F5W#0IW:71H;W5T('=A<FYI;F<-"@T*8V]N > > M<W1A;G0-"@T*"4UA:6X)/2!C<F5A=&4H(%=I;F1O=RP@(D9O8W5S(%1E<W0B > > M+" P+"!#96YT97(L($-E;G1E<BP@-# P+" S,# L(# @*2P-"@E497AT,0D] > > M(&-R96%T92@@161I=%1E>'0L("(B+"!-86EN+"![=S,R161G92PQ,'TL('MW > ...... > > Please don't post perl code to the Euphoria list. > > Thank you. > > Irv It's just uuencoded. Paste into notepad, save with extension .uue, extract with WinZip (or uudecode). Anyway, I think attachments should be avoided because the code doesn't get archived. For such a small amount of code, just paste it:
include Win32Lib.ew without warning constant Main = create( Window, "Focus Test", 0, Center, Center, 400, 300, 0 ), Text1 = create( EditText, "", Main, {w32Edge,10}, {w32Edge,10}, {0.5,-5}, 20, 0 ), Text2 = create( EditText, "", Main, {0.5,5}, {w32Edge,10}, {w32Edge,-10}, 20, 0 ), SubWin = createEx( Window, "", Main, {w32Edge,10}, {w32Edge,40}, {w32Edge,-10}, {w32Edge,-10}, {WS_CHILD,WS_VISIBLE,WS_CLIPSIBLINGS}, WS_EX_CLIENTEDGE ) procedure FocusHandler( integer pSelf, integer pEvent, sequence pParams ) if pSelf = Text1 then puts(1, "Text1") elsif pSelf = Text2 then puts(1, "Text2") elsif pSelf = SubWin then puts(1, "SubWin") end if if pEvent = w32HGotFocus then puts(1, " GotFocus\n") elsif pEvent = w32HLostFocus then puts(1, " LostFocus\n") end if end procedure setHandler( {Text1,Text2,SubWin}, {w32HGotFocus,w32HLostFocus}, routine_id("FocusHandler") ) WinMain( Main, Normal )
-- Brian
2. RE: child windows not receiving focus events?
- Posted by cklester <cklester at yahoo.com> Jul 12, 2004
- 578 views
Brian Broker wrote: > > irv mullins wrote: > > > > posted by: irv mullins <irvm at ellijay.com> > > > > Greg Haberek wrote: > > > > > > M#0II;F-L=61E(%=I;C,R3&EB+F5W#0IW:71H;W5T('=A<FYI;F<-"@T*8V]N > > > M<W1A;G0-"@T*"4UA:6X)/2!C<F5A=&4H(%=I;F1O=RP@(D9O8W5S(%1E<W0B > > > M+" P+"!#96YT97(L($-E;G1E<BP@-# P+" S,# L(# @*2P-"@E497AT,0D] > > > M(&-R96%T92@@161I=%1E>'0L("(B+"!-86EN+"![=S,R161G92PQ,'TL('MW > > ...... > > > > Please don't post perl code to the Euphoria list. > > > > Thank you. > > > > Irv > > It's just uuencoded. Irv was joking. And very funny at that! :D > -- Brian -=ck "Programming in a state of EUPHORIA."
3. RE: child windows not receiving focus events?
- Posted by Brian Broker <bkb at cnw.com> Jul 12, 2004
- 631 views
ck wrote: > Irv was joking. And very funny at that! :D I know, but I still wanted to make the point about attachments... -- Brian
4. RE: child windows not receiving focus events?
- Posted by irv mullins <irvm at ellijay.com> Jul 12, 2004
- 640 views
Brian Broker wrote: > > ck wrote: > > Irv was joking. And very funny at that! :D > > I know, but I still wanted to make the point about attachments... > > -- Brian Good point, because I was unable to decode the file after copy/pasting from the webpage to a .uue file. Perhaps the listfilter/euforum caused some corruption. Looks like it would be best to avoid attachments. Irv
5. RE: child windows not receiving focus events?
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 13, 2004
- 578 views
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