Now the MSDN article is misleading. It shows how to add accelerators to the "About" field, and only the "O" field will be able to process the accelerator, which in this case is equivalent to pressing a button with IDC_BUTTON1 ID.
- , . MDI/SDI.
, : Accelerator, , . , , ID.
, , .
:
HACCEL . InitInstance LoadAccelerators.
PreTranslateMessage . :
if (m_hAccelTable)
{
if (::TranslateAccelerator(*m_pMainWnd, m_hAccelTable, pMsg))
{
return(TRUE);
}
}
. * m_pMainWnd. ( ).
. , OnCmdMsg.
.
, SDI CFormView.
, , , .,
, , , .