-
April 7th, 2004, 09:29 PM
#1
where did F10 go?
hi, gurus,
i have a question about the keydown message. i have a single document application based on MFC, using VC7.1. But it seems that app cannot get the keydown message of F10. Even if i set break point at CxxxApp::PretranslateMessage().
Does anyone know what is the problem?
need i to set a keyhook to solve this problem?
thanks.
-
April 7th, 2004, 09:47 PM
#2
Post the code that checks for the F10 key code.
Kuphryn
-
April 7th, 2004, 09:53 PM
#3
Code:
BOOL CXXXXXXApp::PreTranslateMessage(MSG* pMsg)
{
if(WM_KEYDOWN == pMsg->message && VK_F2<=pMsg->wParam && VK_F10>=pMsg->wParam)
{
TRACE("translating F%d\n",pMsg->wParam-VK_F1+1);
}
return CWinApp::PreTranslateMessage(pMsg);
}
-
April 7th, 2004, 10:23 PM
#4
Interesting. Consider this solution.
if (WM_KEYFIRST <= pMsg->message &&
pMsg->message <= WM_KEYLAST &&
pMsg->wParam >= VK_FX &&
pMsg->wParam <= VK_FY)
{}
Kuphryn
-
April 7th, 2004, 10:40 PM
#5
, thanks,
i found that F10 is a syskey which activate the menu..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|