????? ??????? ?????? ??????? ???? ???? ???? ????? ?? Visual C++

?????? ????????? ?????? ?????????
???? ???????: 222829 - ??? ???????? ???? ????? ????? ??? ???????.
?????? ????? Microsoft Visual C++ .NET (2002) ????? ????????? ???????? ??????? ???? ?? ??????? ?? ??? Microsoft .NET Framework ?????? ????? ????????? ???????? ??? ???????? Microsoft Windows ??????. ????? ????????? ??????? ?? ??? ??????? ??? ??? ????????? ???????? ??? ???????? Visual C++.
????? ???? | ?? ????

??????

?????? ??????? ???? "????? ????????" ????? ?? ??????? Windows ????????? ?????? ????? ????? ??? ??? ??????? ??? ? ???? ??? ?????? ????? ????? ????? ????? ??????? ??? ?? ???? ???? ?????.

??????? ????

??? ?????? ?????? ???? ???????? ?? ???? ??????? ?????? TranslateAccelerator() ?? ???? ????? ?????? ???????. ??? ???? ???? ???? ????? ?????? ???? ?????? ???? ????? (??????? ?? Windows) ??? ??????? ????? ????? ???????. ??????? ???? ?? ??? ????? ??? ???? ????? ??????? ?????? ???? ?? ???????? ?????? TranslateAccelerator().

??????? ?????? ??????? ?? ???? ???? ????? ??? ????? ???? ?????? PreTranslateMessage() ???? ??????? ?????? ??????? ??????? ?? ???? ???????:: TranslateAccelerator(). ??? ??? ??? ??????? ?????? ?? ????? ?? ???? ??????? ????? ???????? PreTranslateMessage().

?????? ??? ??????? ???? ????? ??????? ??????? ??? ???? ?????? AboutBox ??????? MDI MFC:
  1. ????? ????? MDI MFC ???? ???? Test.
  2. ????? ?? ?? ???? ?????? "IDC_BUTTON1" ??? ???? ???? ?????? AboutBox.
  3. ???? ????? ??????? ??? ???? ????? ????? ???? ???? ????? ???????? ???????? ??????? ????? ???? ????? ???????:
    AfxMessageBox("Hello");
  4. ????? "???? ?????" ????? ??? ??????.
  5. ????? ????? ????? ??? ?????? ?? ???? ????? ??? F5 ????? ???? ?????? "IDC_BUTTON1".
  6. ????? m_hAccelTable ????? ? ??? ??? ????? CAboutBox:
    HACCEL  m_hAccelTable;
  7. ????? m_hAccelTable ?? CAboutBox::CAboutBox:
    m_hAccelTable = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR1));
  8. ?????? "????? ???" (??? ????? ?? 6.0 Visual C++ ?????????? ???????) ?????? ??? ????? PreTranslateMessage CAboutDlg.
  9. ?? ????? CAboutBox::PreTranslateMessage() ????? ???? ????????? ???????? ???????:
    BOOL CAboutDlg::PreTranslateMessage(MSG* pMsg) {
       if (m_hAccelTable) {
          if (::TranslateAccelerator(m_hWnd, m_hAccelTable, pMsg)) {
             return(TRUE);
          }
       }
       return CDialog::PreTranslateMessage(pMsg);
    
    }
  10. ????? ?????? CTestApp.

????? ????? ??????? F5 ???? ?????? ????? button1 ????? ???? CAboutBox ????.

?????

?????? ??? ??????? ?????? ??? ????? ??????? ?????? ???? ?????? ???? ?????? ?????? ?????? ??????? ??????? ?? "????? ??????? ?? Microsoft:
INFO 100770: ??????? ???????? ????? ?? ?????? ??????? ???? ???? ?????

???????

???? ???????: 222829 - ????? ??? ??????: 30/????/1427 - ??????: 4.1
????? ???
  • Microsoft Foundation Class Library 4.2, ????? ?????? ??:
    • Microsoft Visual C++ 4.1 Subscription
    • Microsoft Visual C++ 4.2 Enterprise Edition
    • Microsoft Visual C++ 5.0 Enterprise Edition
    • Microsoft Visual C++ 6.0 Enterprise Edition
    • Microsoft Visual C++ 4.2 Professional Edition
    • Microsoft Visual C++ 5.0 Professional Edition
    • Microsoft Visual C++ 6.0 Professional Edition
    • Microsoft Visual C++, 32-bit Learning Edition 6.0
    • Microsoft Visual C++ .NET 2002 Standard Edition
    • Microsoft Visual C++ .NET 2003 Standard Edition
????? ??????: 
kbmt kbacceleratorkey kbhowto kbkeyaccel kbuidesign KB222829 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????222829

????? ???????

 

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