INFO: ??????? ????? ?? ???? ???? ??? ????? ?? MFC

?????? ????????? ?????? ?????????
???? ???????: 117500 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

??????

???????? ????? ?? ???? ???? ??? ????? ????? ?????? () PreTranslateMessage ?? ????? ??????? CDialog ???????.

??????? ????

???????? ????? ?? ???? ???? ??? ????? ?????? ??????? ???????:

  1. ????? ???? ???? ??? ?????. ?????? ??? ???? ?? ?????????? ?????? ?????? ??????? ??????? ?? "????? ??????? ?? Microsoft:
    103788????? ???? ???? ??? ????? ?? ?????? MFC
  2. ????? ??? ????? ???????? ???????? ?? ????? ???????? ????? ???????? ????????:
       // .h file with your derived CDialog class.
       class CModeless : public CDialog
       {
          .
        public:
          virtual BOOL PreTranslateMessage(MSG*);
          .
       };
    
       //.cpp file.
       BOOL CModeless::PreTranslateMessage(MSG* pMsg)
       {
          HACCEL hAccel =
          ((CMainFrame*)AfxGetApp()->m_pMainWnd)->GetAccelTable();
          if(!(hAccel &&
               ::TranslateAccelerator(AfxGetApp()->m_pMainWnd->m_hWnd, hAccel,
                                      pMsg)))
               return CDialog::PreTranslateMessage(pMsg);
          else
             return TRUE;
       }
    
       // Mainfrm.h file, where CMainFrame is the main window class.
       HACCEL CMainFrame::GetAccelTable() { return m_hAccelTable; }
    						
  3. ????? ?????? ?? Studio ??????? ?? ?? "??? ???????" ?? "????? ?????" ?? Visual C++ 32?? Edition? ??????? 4.0. ??? ?? ???? ?????? ?? ???? ?????? IDR_MAINFRAME. ??? ??? ?? ????? ??? ????? ???? ?? ????? ??????? ???? ???? ?????? ??????.

???????

???? ???????: 117500 - ????? ??? ??????: 09/???? ??????/1435 - ??????: 3.1
????? ???
  • Microsoft Foundation Class Library 4.2, ????? ?????? ??:
    • Microsoft Visual C++ 1.0 Professional Edition
    • Microsoft Visual C++ 1.5 Professional Edition
    • Microsoft Visual C++ 1.51
    • Microsoft Visual C++ 1.52 Professional Edition
    • Microsoft Visual C++ 1.0 Professional Edition
    • Microsoft Visual C++ 2.0 Professional Edition
    • Microsoft Visual C++ 2.1
    • Microsoft Visual C++ 4.0 Standard Edition
????? ??????: 
kbnosurvey kbarchive kbmt kbacceleratorkey kbarchitecture kbdlg kbinfo kbkeyaccel kbuidesign KB117500 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????117500

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com