SHSendBackToFocusWindow
4/8/2010
This function sends the BACK key to the control with focus.
After an application overrides the BACK key by sending the SHCMBM_OVERRIDEKEY message to its menu bar, the BACK key message is received as a WM_HOTKEY message. Pass the WM_HOTKEY message and its wParam and lParam values to the application to forward the BACK key to child windows.
Syntax
void SHSendBackToFocusWindow(
UINT uMsg,
WPARAM wp,
LPARAM lp
);
Parameters
- uMsg
The WM_HOTKEY message.
- wParam
The wParam of the WM_HOTKEY message.
- lParam
The lParam of the WM_HOTKEY message. HIWORD contains the virtual key code of the overridden key; LOWORD contains information about the modifier keys or MOD_KEYUP if the key was released.
Return Value
None.
Remarks
An example of this function's usage is where a dialog box with edit controls must override the BACK key because it also functions as BACKSPACE in edit controls. When the dialog box receives the overridden BACK key, as a WM_HOTKEY (with HIWORD(lParam) set to VK_TBACK), it must call the SHSendBackToFocusWindow function to send the BACK key to the control with focus.
A window with child edit controls should override the BACK key and pass the corresponding hotkey messages to those edit controls using this function. If the user presses the BACK key, an edit control will delete the current character. If the user performs a press and hold of the BACK key, a single line edit control will erase all its contents, and a multiline edit control will delete characters one at a time until the BACK key is released. These default behaviors in edit controls can be changed using the EM_SETEXTENDEDSTYLE message.
Requirements
Header | tpcshell.h |
Library | aygshell.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Smartphone 2002 and later |
See Also
Reference
Shell Functions
EM_SETEXTENDEDSTYLE
SHCMBM_OVERRIDEKEY
SHIdleTimerReset