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