读书人

listbox的滚动条消息//PreTranslateMe

发布时间: 2013-01-26 13:47:02 作者: rapoo

listbox的滚动条消息//PreTranslateMessage函数里收不到?//哪在那处理?



BOOL Page3::PreTranslateMessage(MSG* pMsg)
{
// TODO: 在此添加专用代码和/或调用基类
if(pMsg->message == WM_VSCROLL)
{
if(pMsg->hwnd == m_listbox.m_hWnd)
{
if(0 == m_listbox.GetSel(0))
{
m_listbox.InsertString(0,"");
m_listbox.InsertString(1,"");
//m_listbox.SetFocus();
//m_listbox.Set
}
}
}
return CDialog::PreTranslateMessage(pMsg);
}

[解决办法]
得派生listbox子类进行响应
[解决办法]
CMyListBox :public CListBox
在 WM_VSCROLL
[解决办法]
CMyListBox,继续重写。

读书人网 >VC/MFC

热点推荐