16,472
社区成员
发帖
与我相关
我的任务
分享
向CListBox发送一个LB_SETCURSEL消息改变选中项。
那么我在哪里(是不是CListBox的窗口过程函数里)接受到这个消息?
为什么我接受不到???
LRESULT CListBoxEx::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
if(LB_SETCURSEL == message)
{
AfxMessageBox(_T("HELLO"));
}
return CListBox::WindowProc(message, wParam, lParam);
}
LRESULT CNewListBox::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
if(LB_SETCURSEL == message)
{
AfxMessageBox(_T("HELLO"));
}
return CListBox::WindowProc(message, wParam, lParam);
}