16,548
社区成员




BOOL CTestDLgDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
pMsg->hwnd;//消息体传过来的控件句柄,和每个按钮的比较一下不就知道按下的是哪个了
}
ON_CONTROL_RANGE(BN_CLICKED, IDC_BUTTON1, IDC_BUTTON5, OnClick)
//响应函数uID就为当次哪个按钮被点击的ID
afx_msg void OnClick(UINT uID);