SHSetAppKeyWndAssoc

This function assigns a window to receive a particular hardware button's key-press messages.

BOOL SHSetAppKeyWndAssoc(
  BYTE bVk,
  HWND hwnd
);

Parameters

  • bVk
    [in] Key code for the hardware button.
  • hwnd
    [in] Handle to the window that will receive the messages.

Remarks

The bVk values are virtual key codes. Use VK_APP1 through VK_APP6. The number of hardware keys available and physical key locations vary according to the destination device.

Return Values

This function returns TRUE if it is successful and FALSE if it fails.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: AYGShell.h.
Link Library: Aygshell.lib.

See Also

AYGShell Functions | SHGetAppKeyAssoc

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.