User32SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) Method
Sends the specified message to a window or windows.
If the window was created by the calling thread,
SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) calls the window procedure for the window and does not
return until the window procedure has processed the message.
If the window was created by a different thread,
SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) passes the message to the window procedure and returns immediately;
it does not wait for the window procedure to finish processing 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, SetLastError = true)]
public static bool SendNotifyMessage(
IntPtr hWnd,
WindowMessages msg,
[OptionalAttribute] IntPtr wParam,
[OptionalAttribute] IntPtr lParam
)
<DllImportAttribute("User32.dll", CharSet := CharSet.Auto, SetLastError := true>]
Public Shared Function SendNotifyMessage (
hWnd As IntPtr,
msg As WindowMessages,
<OptionalAttribute> wParam As IntPtr,
<OptionalAttribute> lParam As IntPtr
) As Boolean
Dim hWnd As IntPtr
Dim msg As WindowMessages
Dim wParam As IntPtr
Dim lParam As IntPtr
Dim returnValue As Boolean
returnValue = User32.SendNotifyMessage(hWnd,
msg, wParam, lParam)
public:
[DllImportAttribute(L"User32.dll", CharSet = CharSet::Auto, SetLastError = true)]
static bool SendNotifyMessage(
IntPtr hWnd,
WindowMessages msg,
[OptionalAttribute] IntPtr wParam,
[OptionalAttribute] IntPtr lParam
)
[<DllImportAttribute("User32.dll", CharSet = CharSet.Auto, SetLastError = true)>]
static member SendNotifyMessage :
hWnd : IntPtr *
msg : WindowMessages *
[<OptionalAttribute>] wParam : IntPtr *
[<OptionalAttribute>] lParam : IntPtr -> bool
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A handle to the window whose window procedure will receive the message.
If this parameter is HWND_BROADCAST ((HWND)0xffff),
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.
- msg WindowMessages
-
The message to be sent. See WindowMessages.
- wParam IntPtr (Optional)
-
Additional message-specific information.
- lParam IntPtr (Optional)
-
Additional message-specific information.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.