 |
SendMessage ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Sends the specified message to a window or windows. It calls the window procedure for the specified window and does not return until the window procedure has processed the message. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
LRESULT SendMessage(
HWND hWnd, // handle to destination window
UINT Msg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER SendMessage IN user32;
INTEGER hWnd,;
INTEGER Msg,;
INTEGER wParam,;
INTEGER lParam
|
 |
 |
 |
| Parameters: |
 |
hWnd
[in] Handle to the window whose window procedure will receive the message.
Msg
[in] Specifies the message to be sent.
wParam
[in] Specifies additional message-specific information.
lParam
[in] Specifies additional message-specific information. |
 |
 |
| Return value: |
 |
| The return value specifies the result of the message processing; it depends on the message sent. |
 |
 |
| Usage: |
 |
#DEFINE WM_COMMAND 0x0111
#DEFINE ID1_HELP_ABOUT 0x00090007
#DEFINE ID1_TOOLS_MACROS 0x000B0003
#DEFINE ID1_TOOLS_CLASS_BROWSER 0x000B0004
#DEFINE ID1_TOOLS_COMP_GALLERY 0x000B0005
#DEFINE ID1_TOOLS_OBJECT_BROWSER 0x000B0006
#DEFINE ID1_TOOLS_INTELS_MGR 0x000B0007
#DEFINE ID1_TOOLS_TASK_PANE 0x000B0008
#DEFINE ID1_TOOLS_TOOLBOX 0x000B0009
* if the Help part of the VFP 9.0 main menu is enabled
* this call opens the About dialog
= SendMessage(_vfp.hWnd, WM_COMMAND, ID1_HELP_ABOUT, 0)
|
 |
 |
| My comment: |
 |
To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to the message queue of a thread and return immediately, use the PostMessage or PostThreadMessage function.
|
 |
 |
| Word Index links for the SendMessage : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-11-22 20:23:51 | | Modified: | 2009-01-23 16:33:08 | Visited in last 7 days: 157 |