Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.53 KB

PeekMessage.md

File metadata and controls

67 lines (45 loc) · 1.53 KB

Home

Function name : PeekMessage

Group: Message and Message Queue - Library: user32


The PeekMessage function dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves the message (if any exist).


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.


Comments:

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).