View Full Version : SendMessage API Question


BrettM
02-06-2009, 03:43 PM
I am playing around with SendMessage. Using the following I can access and run my Help Routines by sending the current hwnd to the function WhatsThisMode(). The cursor changes to a question mark and waits for me to click on a form object. If it has a Help Context ID then it pops up a specific help window.

Const WM_SYSCOMMAND = &H112
Const SC_CONTEXTHELP = &HF180

Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Integer, _
ByVal lParam As Long) _
As Long

Function WhatsThisMode(lngH As Long)
SendMessage lngH, WM_SYSCOMMAND, SC_CONTEXTHELP, 0
End Function

Instead of running the full routine, all I want to do is retrieve the Help Context ID value but still retain the question mark cursor.

Any suggestions would be appreciated.

Regards Brett