vc学习之键盘事件OnKeyDown

switch (nChar){
 case VK_HOME:
  OnVScroll(SB_TOP,0,NULL);
  OnHScroll(SB_LEFT,0,NULL);
  break;
 case VK_END:
  OnVScroll(SB_BOTTOM,0,NULL);
  OnHScroll(SB_RIGHT,0,NULL);
  break;
 case VK_UP:
  OnVScroll(SB_LINEUP,0,NULL);
  break;
 case VK_DOWN:
  OnVScroll(SB_LINEDOWN,0,NULL);
  break;
 case VK_PRIOR:
  OnVScroll(SB_PAGEUP,0,NULL);
  break;
 case VK_NEXT:
  OnVScroll(SB_PAGEDOWN,0,NULL);
  break;
 case VK_LEFT:
  OnHScroll(SB_LINELEFT,0,NULL);
  break;
 case VK_RIGHT:
  OnHScroll(SB_LINERIGHT,0,NULL);
  break;
 default:
  break;
 }

你可能感兴趣的:(开发语言)