本例中按下Ctrl+X时跳到名为IDC_EDIT1的文本框中
BOOL CMydilog::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if (pMsg->message == WM_KEYDOWN)
{
switch (pMsg->wParam)
{
case VK_ESCAPE:
SetFocus ();
return TRUE;
case 'X':
if(::GetKeyState(VK_CONTROL) < 0)
GetDlgItem(IDC_EDIT1)-> SetFocus();
return TRUE;