ITfMessagePump::PeekMessageW method (msctf.h)

Obtains a message from the message queue and returns if no message is obtained. This is the Unicode version of this method.

Syntax

HRESULT PeekMessageW(
  [out] LPMSG pMsg,
  [in]  HWND  hwnd,
  [in]  UINT  wMsgFilterMin,
  [in]  UINT  wMsgFilterMax,
  [in]  UINT  wRemoveMsg,
  [out] BOOL  *pfResult
);

Parameters

[out] pMsg

Pointer to a MSG structure that receives message data.

[in] hwnd

Handle to the window whose messages are obtained. The window must belong to the current thread. If this value is NULL, this method obtains messages for any window that belongs to the calling thread.

[in] wMsgFilterMin

Specifies the lowest message value to obtain.

[in] wMsgFilterMax

Specifies the highest message value to obtain.

[in] wRemoveMsg

Specifies how messages are handled. For more information, see the PeekMessage function.

[out] pfResult

Pointer to a BOOL that receives the return value from the PeekMessage function.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_INVALIDARG
One or more parameters are invalid.

Remarks

If wMsgFilterMin and wMsgFilterMax are both zero, this method returns all available messages; that is, no range filtering is performed.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header msctf.h
DLL Msctf.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See also

ITfMessagePump

MSG

PeekMessage