我编个计算器,要实现对小键盘上的动静做出响应,
在classes里右击选
add windows message handler
后添加WM_KEYDOWN得
void CCalcDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
// TODO: Add your message handler code here and/or call default

CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
后就不知道该添加什么代码,
请给点示例吧

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/1365/1365481.xml?temp=.3908045http://expert.csdn.net/Expert/topic/1368/1368570.xml?temp=.9788172http://expert.csdn.net/Expert/topic/1154/1154453.xml?temp=.5471155
      

  2.   

    nChar 中是按键的ASCII值,nFlags的第8位是1,则按键是功能键或小键盘上的按键
      

  3.   

    对呀 只要知道了ASCII值就可以了!
      

  4.   

    if(pMsg->message==WM_KEYDOWN)   pMsg->wparam就是被按下的键值
      
    }
      

  5.   

    if(nChar == 0x6d)//小键盘:-
    0x6b//小键盘:+
    0x6a//小键盘:*
    0x6f//小键盘:/
    .....
      

  6.   

    看一看  jemmylau(枕头) ( )  提供的