User32SendMessage(SafeHandle, WindowMessages, IntPtr, StringBuilder) Method
Sends the specified message to a window or windows.
The SendMessage function calls the window procedure for the specified window
and does not return until the window procedure has processed the message.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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 IntPtr SendMessage(
SafeHandle hWnd,
WindowMessages msg,
IntPtr wParam,
StringBuilder lParam
)
<DllImportAttribute("User32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function SendMessage (
hWnd As SafeHandle,
msg As WindowMessages,
wParam As IntPtr,
lParam As StringBuilder
) As IntPtr
Dim hWnd As SafeHandle
Dim msg As WindowMessages
Dim wParam As IntPtr
Dim lParam As StringBuilder
Dim returnValue As IntPtr
returnValue = User32.SendMessage(hWnd,
msg, wParam, lParam)
public:
[DllImportAttribute(L"User32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static IntPtr SendMessage(
SafeHandle^ hWnd,
WindowMessages msg,
IntPtr wParam,
StringBuilder^ lParam
)
[<DllImportAttribute("User32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member SendMessage :
hWnd : SafeHandle *
msg : WindowMessages *
wParam : IntPtr *
lParam : StringBuilder -> IntPtr
No code example is currently available or this language may not be supported.
- hWnd SafeHandle
-
A handle to the window whose window procedure will receive the message.
- msg WindowMessages
-
The message to be sent.
- wParam IntPtr
-
Additional message-specific information.
- lParam StringBuilder
-
Additional message-specific information.
IntPtr
The return value specifies the result of the message processing; it depends on the message sent.