User32PostMessage(HandleRef, Int32, IntPtr, StringBuilder) Method

Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool PostMessage(
	HandleRef hWnd,
	int message,
	IntPtr wparam,
	StringBuilder lparam
)

Parameters

hWnd  HandleRef
Handle to the window whose window procedure will receive the message.

If this parameter is HWND_Broadcast, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.

message  Int32
Specifies the message to be sent.
wparam  IntPtr
Specifies additional message-specific information.
lparam  StringBuilder
Specifies additional message-specific information.

Return Value

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also