关于PreTranslateMessage()函数的小程序示例:

BOOL CSearchuserDlg::PreTranslateMessage(MSG* pMsg)
{

    if(pMsg->message==WM_KEYDOWN)  //判断是否有按键按下
    {
       switch(pMsg->wParam)
       {
          case VK_DOWN:     //表示是方向键中的向下的键

              //add handle code here

          break;

          case VK_UP:      //表示是方向键中的向上的键

               //add handle code here

          break;

          default:

          break;

       }

   }

}

相关文章:

  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
猜你喜欢
  • 2022-12-23
  • 2021-04-03
  • 2022-12-23
  • 2021-05-12
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
相关资源
相似解决方案