winapi - SendMessage to click on Non-Client items -


I'm having trouble with SendMessage to activate a menu on another program. When someone clicks on a user menu, so when viewed through the Spy ++ following reasons:

 000A0628 P WM_NCLBUTTONDOWN nHittest: HTMENU xPos: 1706 yPos: 395 [wParam: 00000005 lParam: 018B06AA Time: 27: 23: 56.156 Point: (1706, 395)] 000A0628SWM_SYSCOMMAND uCmdType: SC_MOUSEMENU xPos: 1706 yPos: 395 [wParam: 0000F095 lParam: 018B06AA] 000A0628SWM_ENTERMENULOOP fIsTrackPopupMenu: Wrong [wParam: 00000000 lParam: 00000000] 000A0628 R WM_ENTERMENULOOP lResult: 00000000 000A0628 S WM_SETCURSOR hwnd: 000A0628 nHittest: HTCAPTION wMouseMsg: 0000 [wParam: 000A0628 lParam: 00000002] 000A0628 R WM_SETCURSOR fHaltProcessing: wrong [lResult: 00000000] 000A0628 S WM_INITMENU hmenuInit: 00,200,355 [wParam: 00,200,355 lParam: 00000000] 000C0672S EM_GETSEL lpdwStart: 0010E FA0 lpdwEnd: 0010EFA4 [WPAMAM: 0010EFAF0LPARM: 0010EFA4] 000C672REM_Gussell wSTart: 26th: 26LPD: START: 0010EFFA (684) LPDIND: 0010EFA4 (276) [ALSALT: 001A 99A] 000C 0672 S WM_GETETAHAPAMAPAPAM: 00000000 LPARM: 00000000000 C 0672 RWMGETETLANntt CC H: 26 [Lusult: 0000001A] 000C0672 S EMKANDO WMPM: 00000000 LPAMM: 00000000 000 C 0672 R EMCoundo FCanando: Troglt: 00000001] 00 0 A 6628 R Dbluemjiaitimanu Elarsltः 00000000 000 E 0608 S Dbluem_mianuyuelis Uaitim: 0 Fyuel: Maf_opiopiupiupi. MF_HILITE | MF_MOUSESELECT hmenu: 00200355 [wParam: 80900000 lParam: 00200355] 000A0628 RWM_MENUSELECT lResult: 00000000000A0628S WM_INITMENUPOPUP hmenuPopup: 00,150,595 uPos: 0 fSystemMenu: wrong [wParam: 00,150,595 lParam: 00000000] 000A0628 R WM_INITMENUPOPUP lResult: 00000000 

while when I try to use SendMessage with instead WM_NCLBUTTONDOWN the following reasons:

 000A0628 P WM_NCLBUTTONDOWN nHittest: HTMENU xPos: 1700 yPos: 400 [Dblupiam: 00000005 lParam: 01 9 006A4 Time: 27: 25: 02.156 Point: (1700, 400)] 000A0628SWM_SYSCOMMAND uCmdType: SC_MOUSEMENU xPos: 1700 yPos: 400 [wParam: 0000F095 lParam: 019006A4] 000A0628SWM_ENTERMENULOOP fIsTrackPopupMenu: Wrong [wParam: 00000000 lParam: 00000000] 000A0628RWM_ENTERMENULOOP lResult: 00000000 000A0628 S WM_EXITMENULOOP Faistrak Popapmenu: false [Dblupiamm: 00000000 Elpiamm: 00000000] 000 A 6628 R Dbluem_aksimeanyueloupielarslt: 00000000 000 E 0608 S Dbluem_mianuyuesitiim: 0 Fyuefagj: Ffff Hamenu (menu off): 00000000 [Dblupiamfff 0000 Elpiamm: 00000000] 0 00A0628 RWM_MENUSELECT lResult: 00000000 000A0628SWM_EXITMENULOOP fIsTrackPopupMenu: False [wParam: 00000000 lParam: 00000000] 000A0628R WM_EXITMENULOOP lResult: 00000000 000A0628R WM_SYSCOMMAND lResult: 00000000 

Does anyone work it properly Is how to know?

Cheers

Ross

I think that the mouse Menu loop test for the position of the button However, you have not simulated by pressing the mouse button, whatever you are doing is sending the message that the button is down.

If you need synchronous behavior, then I will suggest and block your thread to the right time (in other words, you can use an asynchronous approach and then wrap it so that it blocks to be and act as a synchronous call. it's extra work, but if you can insist on a synchronous behavior naturally asynchronous that, this is your best overall It is the purpose.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -