1. [Win32Lib] Equivalent of Screen for setWinMsgHandler()
- Posted by "Andrew Hall" <barnacle83-euforum at yahoo.com> Aug 08, 2004
- 372 views
Hi! Does anyone know an equivalent of Screen for setWinMsgHandler()? I'm trying to set a low-level handler for my entire application. If I were using setHandler(), I'd just use Screen; but Screen doesn't seem to work for setWinMsgHandler(). Here's what I'm doing for now:
function getIds() sequence handles, ids handles = getHandles() ids = {} for i = 1 to length(handles) do if handles[i] > 0 then ids &= getId(handles[i]) end if end for return ids end function function AllCtrls_onKEYDOWN(integer pSource, atom hWnd, atom iMsg, atom wParam, atom lParam) ... end function setWinMsgHandler(getIds(), WM_KEYDOWN, routine_id("AllCtrls_onKEYDOWN"))
Is there a more elegant way to do this? Andrew
2. Re: [Win32Lib] Equivalent of Screen for setWinMsgHandler()
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 08, 2004
- 399 views
Andrew Hall wrote: > > Hi! > > Does anyone know an equivalent of Screen for setWinMsgHandler()? I'm trying > to set a low-level handler for my entire application. If I were using > setHandler(), I'd just use Screen; but Screen doesn't seem to work for > setWinMsgHandler(). That would be a bug then. I'll fix that. In the meantime, you could just try ... procedure AllCtrls_onKEYDOWN(integer self, integer event, sequence parms) ... end procedure setHandler(Screen, w32HKeyDown, routine_id("AllCtrls_onKEYDOWN")) -- Derek Parnell Melbourne, Australia