Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AllKeys

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function allows your programs to request that all key presses be sent directly to the requesting application. Normally some buttons are intercepted by the operating system for its own use, but games and input - intensive applications may want access to these buttons for their own use.


BOOL AllKeys(
    BOOL bAllKeys
);

bAllKeys

[in] If bAllKeys is set to TRUE, this function allows all keyboard events to be sent to the application. (This includes the softkey buttons and back button).

If it is set to FALSE, this function specifies standard keyboard event behavior. Some events including softkey buttons and the back button are not sent to the application.

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

The following C++ code illustrates how to use AllKeys. In the application that this sample is taken from, a check box is used to set AllKeys to true or false.

// process checkbox
case IDC_ALL_KEYS_CHECK_BOX:
    if (g_AllKeys == true)
    {
        AllKeys(0);// Allow os to intercept some key / button presses 
        g_AllKeys = false;
        // set button state
        SendMessage(hwndCtl,BM_SETCHECK, BST_UNCHECKED,0);
    }
    else
    {
        AllKeys(1); // Do not allow os to intercept button presses 
        g_AllKeys = true;
        //set button state
        SendMessage(hwndCtl,BM_SETCHECK, BST_CHECKED,0);
    }

Headerwinuser.h
Windows MobileSmartphone for Windows Mobile 2003 and later

Community Additions

Show:
© 2015 Microsoft