Share via


GetMessageSource

This function determines the source of a keyboard message.

UINT GetMessageSource( ); 

Return Values

MSGSRC_SOFTWARE_POST indicates that the message source was software. MSGSRC_HARDWARE_KEYBOARD indicates that the message source was the keyboard. MSGSRC_UNKNOWN indicates that the message source is unknown.

Remarks

When targeting devices that support both a hardware keyboard and a soft keyboard, you can use the GetMessageSource function to determine the source of a keyboard input message. Keyboard events that originate from the keyboard driver or keybd_event are marked as hardware. Messages generated from PostMessage are marked as software.

Use this function to determine the source of the following messages:

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Winuser.h.
Link Library: Coredll.lib.

See Also

Message Queue Functions | keybd_event | PostMessage | WM_KEYDOWN | WM_KEYUP | WM_SYSKEYDOWN | WM_SYSKEYUP

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.