用vc 作的单文档程序,不需要F1系统帮助,如何屏蔽掉?

yanw0212 2003-10-13 10:50:16
那位高手可以指教?
...全文
73 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
rofole 2003-11-21
  • 打赏
  • 举报
回复
注释掉ON_COMMAND(ID_HELP, CWinApp::OnHelp)
tinyfog 2003-10-13
  • 打赏
  • 举报
回复
GZ
zhansg 2003-10-13
  • 打赏
  • 举报
回复
删除ACCELERATOR中键值为VK_F1的ID
或者删除消息映射即可
smxx 2003-10-13
  • 打赏
  • 举报
回复
直接删掉消息就可以了
awant2k 2003-10-13
  • 打赏
  • 举报
回复
在主程序的 WindowProc 中拦截 WM_HELP 并返回 TRUE 以过滤该消息

----
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.

Remarks

The DefWindowProc function passes WM_HELP to the parent window of a child window or to the owner of a top-level window.

FlyYang 2003-10-13
  • 打赏
  • 举报
回复
添加响应WM_HELPINFO的函数,然后删除里面代码,直接返回

---------
++C++
---------
txdxun 2003-10-13
  • 打赏
  • 举报
回复
重载App的WinHelp
vcforever 2003-10-13
  • 打赏
  • 举报
回复
重载CMainFrame类的PreTranslate()函数在函数中进行如下处理
BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message==WM_KEYDOWN){
if(pMsg->wparam == VK_F1)
return false;
}
return CMainFrame::PreTranslateMessage(pMsg);
}
就可以了!

祝你成功!
VCNULL 2003-10-13
  • 打赏
  • 举报
回复
最简单的办法就是从菜单中删除该菜单项,然后在快捷键(在资源中的Accelerator中)。
anxing 2003-10-13
  • 打赏
  • 举报
回复
屏蔽掉一个系统键方法:
1:在自己的程序中处理如:F1,之类。
2:做一个键盘钩子。如:CTRL+ALT+DEL.

注:有的系统键可以通过函数屏蔽如WIN98下的CTRL+ALT+DEL。
先考虑方法1,不行就方法2.
Ah 2003-10-13
  • 打赏
  • 举报
回复
都说完了,混分

16,551

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧