I have a mouse hook process sending messages to my DlgProc. When the mousepointer is hovering over different windows the window handle is posted to the DlgProc as a WM_USER+100 message. The handle is shown in an editcontrol. Now I want to show the handle only if I click a mousebutton. I haven't found any threads on the bourd discussing this, so my question is how to notify a mouseclick on a foreign window in my DlgProc?
Posted on 2003-03-18 07:27:40 by minor28
I found a solution myself.

MouseProc proc nCode:DWORD,wParam:DWORD,lParam:DWORD

[color=red].if wParam==WM_RBUTTONDOWN[/color]
invoke CallNextHookEx,hHook,nCode,wParam,lParam
mov edx,lParam
invoke WindowFromPoint,[edx].pt.x,[edx].pt.y
invoke PostMessage,hWnd,WM_USER+100,eax,0
assume edx:nothing
xor eax,eax
MouseProc endp
Posted on 2003-03-18 10:19:03 by minor28