if(bShiftKeyPressed) { switch(pMsg->wParam) { case VK_LEFT: // LEFT AfxMessageBox("1"); m_p->shiftKeyPress(1); break; case VK_RIGHT:// RIGHT AfxMessageBox("2"); m_p->shiftKeyPress(2); break; case VK_HOME: // HOME AfxMessageBox("3"); m_p->shiftKeyPress(3); break; ... } ... } ...