View Single Post
  #1  
Old 07-04-2006, 22:25
aldente aldente is offline
VIP
 
Join Date: Jul 2003
Posts: 266
Rept. Given: 27
Rept. Rcvd 7 Times in 5 Posts
Thanks Given: 35
Thanks Rcvd at 10 Times in 9 Posts
aldente Reputation: 7
WinAPI: No WM_COMMAND Message?

Hello!

I'm trying to remote control an application using SendMessage. When you send ALT+P to that application, it does what it should do, but I want to control it directly by sending a message. So I do NOT want to send KEYDOWN and KEYUP messages, but the message that invokes the proper function (normally WM_COMMAND). Instead, there are hundreds of strange other messages within less than one second.

The problem with this app is: There are no WM_COMMAND messages, like in 'normal' applications, so I'm a bit confused Maybe some API-expert can help me?

This is what happens after lifting the last key (press ALT, press P, lift P, lift ALT):

Code:
<00040> 0024094C P WM_KEYUP nVirtKey:VK_MENU cRepeat:1 ScanCode:00 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
<00041> 0024094C S message:0xBD01 [Benutzerdefiniert:WM_USER+47361] wParam:00000012 lParam:C0000001
<00042> 0024094C R message:0xBD01 [Benutzerdefiniert:WM_USER+47361] lResult:00000000
<00043> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00044> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00045> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00046> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00047> 003E07A6 S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00048> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00049> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00050> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00051> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00052> 004F07F2 S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00053> 004406DC S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00054> 006306FE S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00055> 004E07C6 S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00056> 004E07C6 R WM_SETCURSOR fHaltProcessing:False
<00057> 006306FE R WM_SETCURSOR fHaltProcessing:False
<00058> 004406DC R WM_SETCURSOR fHaltProcessing:False
<00059> 004F07F2 R WM_SETCURSOR fHaltProcessing:False
<00060> 003E07A6 R WM_SETCURSOR fHaltProcessing:False
<00061> 003E07A6 P WM_MOUSEMOVE fwKeys:0000 xPos:398 yPos:9
<00062> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00063> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00064> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00065> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00066> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00067> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00068> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00069> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00070> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00071> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00072> 003E07A6 S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00073> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00074> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00075> 003E07A6 S WM_NCHITTEST xPos:802 yPos:481
<00076> 003E07A6 R WM_NCHITTEST nHittest:HTCLIENT
<00077> 004F07F2 S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00078> 004406DC S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00079> 006306FE S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00080> 004E07C6 S WM_SETCURSOR hwnd:003E07A6 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00081> 004E07C6 R WM_SETCURSOR fHaltProcessing:False
<00082> 006306FE R WM_SETCURSOR fHaltProcessing:False
<00083> 004406DC R WM_SETCURSOR fHaltProcessing:False
<00084> 004F07F2 R WM_SETCURSOR fHaltProcessing:False
<00085> 003E07A6 R WM_SETCURSOR fHaltProcessing:False
<00086> 003E07A6 P WM_MOUSEMOVE fwKeys:0000 xPos:398 yPos:9
I logged it three different times, maybe that can help you:

http://home.scarlet.be/~lb178476/test1.txt
http://home.scarlet.be/~lb178476/test2.txt
http://home.scarlet.be/~lb178476/test3.txt

Thanks in advance!


/Edit: Additional information:

The application is written in Delphi and uses the SpTBXLib (http://club.telepolis.com/silverpointdev/index.htm).

Last edited by aldente; 07-04-2006 at 23:38.
Reply With Quote