那位高手可以指教?

解决方案 »

  1.   

    添加响应WM_HELPINFO的函数,然后删除里面代码,直接返回---------
      ++C++
    ---------
      

  2.   

    在主程序的 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. Res The DefWindowProc function passes WM_HELP to the parent window of a child window or to the owner of a top-level window. 
      

  3.   

    删除ACCELERATOR中键值为VK_F1的ID
    或者删除消息映射即可
      

  4.   

    屏蔽掉一个系统键方法:
    1:在自己的程序中处理如:F1,之类。
    2:做一个键盘钩子。如:CTRL+ALT+DEL.注:有的系统键可以通过函数屏蔽如WIN98下的CTRL+ALT+DEL。
    先考虑方法1,不行就方法2.
      

  5.   

    最简单的办法就是从菜单中删除该菜单项,然后在快捷键(在资源中的Accelerator中)。
      

  6.   

    重载CMainFrame类的PreTranslate()函数在函数中进行如下处理
    BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) 
    {
    if(pMsg->message==WM_KEYDOWN){
                  if(pMsg->wparam == VK_F1)
                      return false;
    }
    return CMainFrame::PreTranslateMessage(pMsg);
    }
    就可以了!祝你成功!
      

  7.   

    注释掉ON_COMMAND(ID_HELP, CWinApp::OnHelp)