那位高手可以指教?
解决方案 »
- 怎么让CGridCtrl复选框居中
- 对话框类on timer()是否会被其它成员函数抢占?
- 急!!对鼠标事件的图片变换的响应问题
- 只使用VC6.0,如何对2000JUL版的MSDN进行精简?
- 请教请教一个关于dll和activex的问题
- VC++数据类型
- 放左边的TOOLBAR和下边的状态栏statubar有部分重叠,怎么办?
- 如何能够得到mdi子窗口的句柄。
- word文档结构
- 我的对话框程序一启动便开始隐藏,我想禁止其他程序用FindWindow(NULL,"标题")->ShowWindow(),应该怎么做?
- 不规则图形窗口怎么样能随主窗口的大小改变而变化大小,并且图形形状不变
- 鼠标形状是自定义的,当鼠标移动到另一个程序的Dialog上,鼠标不可见,急!
++C++
---------
WM_HELP
Indicates that the user pressed the F1 key. If a menu is active when F1 is pressed, WM_HELP is sent to the window associated with the menu; otherwise, WM_HELP is sent to the window that has the keyboard focus. If no window has the keyboard focus, WM_HELP is sent to the currently active window. Syntax WM_HELP
lphi = (LPHELPINFO) lParam; Parameters lphi
Address of a HELPINFO structure that contains information about the menu item, control, dialog box, or window for which Help is requested.
Return Values Returns TRUE. Res The DefWindowProc function passes WM_HELP to the parent window of a child window or to the owner of a top-level window.
或者删除消息映射即可
1:在自己的程序中处理如:F1,之类。
2:做一个键盘钩子。如:CTRL+ALT+DEL.注:有的系统键可以通过函数屏蔽如WIN98下的CTRL+ALT+DEL。
先考虑方法1,不行就方法2.
BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message==WM_KEYDOWN){
if(pMsg->wparam == VK_F1)
return false;
}
return CMainFrame::PreTranslateMessage(pMsg);
}
就可以了!祝你成功!