User32TranslateMessage Method

Translates virtual-key messages into character messages. The character messages are posted to the calling thread's message queue, to be read the next time the thread calls the GetMessage(NativeMessage, IntPtr, UInt32, UInt32) or PeekMessage(NativeMessage, IntPtr, UInt32, UInt32, PeekMessageFlags) function.

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", ExactSpelling = true)]
public static bool TranslateMessage(
	out NativeMessage refMsg
)

Parameters

refMsg  NativeMessage
A pointer to a structure that contains message information retrieved from the calling thread's message queue by using the GetMessage(NativeMessage, IntPtr, UInt32, UInt32) or PeekMessage(NativeMessage, IntPtr, UInt32, UInt32, PeekMessageFlags) function.

Return Value

Boolean
If the message is translated (that is, a character message is posted to the thread's message queue), the return value is .

f the message is WM_KeyDown, WM_KeyUp, WM_SysKeyDown, or WM_SysKeyUp, the return value is , regardless of the translation.

If the message is not translated (that is, a character message is not posted to the thread's message queue), the return value is .

Remarks

See Also