Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Processing messages from WindowProc
#2
it works. To test, I replaced wait to mes. It shows these messages received by the message box.

Function WinProcMessages
Code:
Copy      Help
function [nCode] [wParam] [CWPSTRUCT*m]

if(getopt(nargs)=0)
,int+ g_whook=SetWindowsHookEx(WH_CALLWNDPROC &WinProcMessages _hinst GetCurrentThreadId)
,;opt waitmsg 1
,;wait -1 -V g_whook
,mes 1
,ret

sel m.message
,case WM_LBUTTONDBLCLK
,out "double"

,case WM_MOVE
,out "move"
;;;
,case WM_SIZE
,out "size"

ret CallNextHookEx(g_whook nCode wParam m)

I tested on Vista. If does not work, try to replace _hinst to 0.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)