Win32Lib Losing Keys

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

Can somebody please help me with this problem? Run the code below.
Type anything. You'll see the result in the statusbar. Now click the
button. Try typing again. No KeyPress response.

You can try setting the onClick event for the button to setFocus(Window1)
but it still won't work. How do I make the button lose focus again so
the Window can receive key events? Or should I go about this difrerently?

Thanks!!!

--  code generated by Win32Lib IDE v0.18.14

include Win32Lib.ew
without warning

--------------------------------------------------------------------------------
--  Window Window1
constant Window1 = createEx( Window, "Window1", 0, Default, Default, 434, 352,
0, 0 )
constant StatusBar2 = createEx( StatusBar, "StatusBar2", Window1, 0, 0, 0, 0, 0,
0 )
constant PushButton4 = createEx( PushButton, "PushButton4", Window1, 96, 124,
88, 28, 0, 0 )
---------------------------------------------------------
--------------------------------------------------------------------------------
procedure Window1_onKeyPress (integer self, integer event, sequence
params)--params is ( int keyCode, int shift )
	setText(StatusBar2, "Got key " & params[1] & "." )
end procedure
setHandler( Window1, w32HKeyPress, routine_id("Window1_onKeyPress"))

WinMain( Window1,Normal )

-=ck
"Programming in a state of EUPHORIA."

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

Search



Quick Links

User menu

Not signed in.

Misc Menu