User32SendMessageTimeout(SafeHandle, ProgressBarMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Method
Sends the specified message to a ProgressBar control.
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", SetLastError = true)]
public static IntPtr SendMessageTimeout(
SafeHandle hWnd,
ProgressBarMessages msg,
IntPtr wParam,
IntPtr lParam,
SendMessageTimeoutFlags fuFlags,
int uTimeout,
out IntPtr refResult
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function SendMessageTimeout (
hWnd As SafeHandle,
msg As ProgressBarMessages,
wParam As IntPtr,
lParam As IntPtr,
fuFlags As SendMessageTimeoutFlags,
uTimeout As Integer,
<OutAttribute> ByRef refResult As IntPtr
) As IntPtr
Dim hWnd As SafeHandle
Dim msg As ProgressBarMessages
Dim wParam As IntPtr
Dim lParam As IntPtr
Dim fuFlags As SendMessageTimeoutFlags
Dim uTimeout As Integer
Dim refResult As IntPtr
Dim returnValue As IntPtr
returnValue = User32.SendMessageTimeout(hWnd,
msg, wParam, lParam, fuFlags, uTimeout,
refResult)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static IntPtr SendMessageTimeout(
SafeHandle^ hWnd,
ProgressBarMessages msg,
IntPtr wParam,
IntPtr lParam,
SendMessageTimeoutFlags fuFlags,
int uTimeout,
[OutAttribute] IntPtr% refResult
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member SendMessageTimeout :
hWnd : SafeHandle *
msg : ProgressBarMessages *
wParam : IntPtr *
lParam : IntPtr *
fuFlags : SendMessageTimeoutFlags *
uTimeout : int *
refResult : IntPtr byref -> 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.
If this parameter is HWND_Broadcast,
the message is sent to all top-level windows in the system, including disabled or invisible unowned windows.
The function does not return until each window has timed out.
Therefore, the total wait time can be up to the value of uTimeout multiplied by the number of top-level windows.
- msg ProgressBarMessages
-
The message to be sent.
For lists of the system-provided messages, see System-Defined Messages:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644927%28v=vs.85%29.aspx#system_defined
- wParam IntPtr
-
Any additional message-specific information.
- lParam IntPtr
-
Any additional message-specific information.
- fuFlags SendMessageTimeoutFlags
-
The behavior of this function.
- uTimeout Int32
-
The duration of the time-out period, in milliseconds.
If the message is a broadcast message, each window can use the full time-out period.
For example, if you specify a five second time-out period and there are three top-level windows that fail to process the message,
you could have up to a 15 second delay.
- refResult IntPtr
-
The result of the message processing.
The value of this parameter depends on the message that is specified.
IntPtr
If the function succeeds, the return value is nonzero.
If the function fails or times out, the return value is 0.
SendMessageTimeout(IntPtr, EditControlMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) does not provide information about
individual windows timing out if
HWND_Broadcast is used.
To get extended error information, call
GetLastWin32Error.
If
GetLastWin32Error returns
ERROR_TIMEOUT, then the function timed out.