 |
PeekMessage ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The PeekMessage function dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves the message (if any exist). |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL PeekMessage(
LPMSG lpMsg,
HWND hWnd,
UINT wMsgFilterMin,
UINT wMsgFilterMax,
UINT wRemoveMsg
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER PeekMessage IN user32;
STRING @ lpMsg,;
INTEGER hWnd,;
INTEGER wMsgFilterMin,;
INTEGER wMsgFilterMax,;
INTEGER wRemoveMsg
|
 |
 |
 |
| Parameters: |
 |
lpMsg
[out] Pointer to an MSG structure that receives message information.
hWnd
[in] Handle to the window whose messages are to be examined. The window must belong to the current thread.
wMsgFilterMin
[in] Specifies the value of the first message in the range of messages to be examined.
wMsgFilterMax
[in] Specifies the value of the last message in the range of messages to be examined.
wRemoveMsg
[in] Specifies how messages are handled.
|
 |
 |
| Return value: |
 |
| If a message is available, the return value is nonzero. |
 |
 |
| Usage: |
 |
* flushes Mouse windows messages
* for all windows that belong to the current thread
#DEFINE WM_MOUSEFIRST 0x0200
#DEFINE WM_MOUSELAST 0x0209
#DEFINE PM_REMOVE 0x0001
cBuffer=REPLICATE(CHR(0), 64)
DO WHILE PeekMessage(@cBuffer, 0, WM_MOUSEFIRST,;
WM_MOUSELAST, PM_REMOVE) <> 0
DOEVENTS
ENDDO
|
 |
 |
| My comment: |
 |
| If hWnd is NULL, PeekMessage retrieves messages for any window that belongs to the current thread, and any messages on the current thread"s message queue whose hwnd value is NULL (see the MSG structure). |
 |
 |
| Word Index links for the PeekMessage : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2002-08-10 10:03:16 | | Modified: | 2009-02-17 15:38:24 | Visited in last 7 days: 23 |