thanks!

解决方案 »

  1.   


    BOOL CGetFlashDlg::PreTranslateMessage(MSG* pMsg) 
    {
    if (pMsg->message == 0x4d) {
    // Magical mystical MFC F1 Help msg!
    if (GetKeyState(VK_SHIFT) >= 0) {
    // Shift key not down
    // Supply general dialog level help
    // OnCommandHelp(0, 0);
    OnHelpInfo(NULL);
    return(TRUE); // Eat it
    }
    #ifdef FLOATING_ARROW
    else {
    // Use this if you want Shift+F1 to create the floating arrow instead
    SendMessage(WM_SYSCOMMAND, SC_CONTEXTHELP);
    return(TRUE);
    }
    #endif FLOATING_ARROW
    }
    return CDialog::PreTranslateMessage(pMsg);
    }BOOL CGetFlashDlg::OnHelpInfo(HELPINFO* pHelpInfo) 
    {
    char dir[256]="";
    GetModuleFileName(NULL,dir,256);
    CString str(dir),floder;
    int n=0,m;
    while((n=str.Find("\\",n+1))!=-1)
    m=n;
    floder=str.Mid(0,m); floder+="\\GetFlash.chm";
    ShellExecute(m_hWnd, _T("open"),floder, NULL,NULL,SW_SHOW);
    return TRUE;
    }
      

  2.   

    还有就是你可以重载框架类的OnWinhelp()函数,在其中写你的代码,然后不要调用父类的函数。