This method gets the flags of the keys used.
HRESULT FlagKeysUsed( long lKeysUsed, long lKeysEaten );
NOERROR indicates success. If an error occurs, the appropriate HRESULT value is returned.
This method allows you to notify a NavArrow control that your form or application can handle particular keystrokes. The NavArrow control queries the Forms Manager about such keystrokes by posting a WM_QUERYKEYUSAGE message. The lparam of this message is a pointer to an IQueryKeyUsage interface. The form sink or application sink that processes keystrokes should call IQueryKeyUsage::FlagKeysUsed with the flags for each of the navigation keystrokes that the form or application can process or discard. Discarded keystrokes are keystrokes to which the sink does not respond but for which the sink will return S_FALSE, preventing other message handlers from having the opportunity to process the keystroke.
Only forms or applications that intercept arrow keystrokes or enter keystrokes need to process the WM_QUERYKEYUSAGE message.
The following code example shows how to use the WM_QUERYKEYUSAGE message and IQueryKeyUsage::FlagKeysUsed method.
if (WM_APCSYSMSG_QUERYKEYUSAGE == uMsg)
{
IQueryKeyUsage *pqku = (IQueryKeyUsage*)lParam;
// Return the result of FlagKeyUsed as the return value for
// the current method.
return pqku->FlagKeysUsed((QKU_VK_LEFT | QKU_VK_RIGHT), (QKU_VK_UP | QKU_VK_DOWN));
}