1. Re: Win32lib key capturing didn't work????

I'm back again ...I posted a message a few days ago with a number of questions 
.. one question being how do you capture key strokes in a window using win32lib
.... i then replied to myself saying i had figured it out ... i'm now replying to
say i haven't!!! and hoping someone can help ... check out the following sample
program ......

Thanks for your time
Ray Smith


--
-- test onKeyPress
--

include win32lib.ew

constant
Main = create(Window, "Test", 0, Default, Default,
        200,100,or_all({WS_DLGFRAME, WS_SYSMENU, WS_MINIMIZEBOX}))

-- uncomment following two lines stops onKeyPress...
--constant
--cmd = create(PushButton, "OK", Main, 10, 10, 80, 40, 0 )

global procedure onKeyPress_Main(integer KeyPress)
    puts(1, KeyPress)
end procedure

onKeyPress[Main]    = routine_id("onKeyPress_Main")

WinMain(Main)

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu