[Win32Lib] Equivalent of Screen for setWinMsgHandler()

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

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu