都是处理滚动条事件,通过
afx_msg void OnHScroll(
UINT nSBCode,
UINT nPos,
CScrollBar* pScrollBar
);
最后一个参数标示。
pScrollBar
If the scroll message came from a scroll-bar control, contains a pointer to the control. If the user clicked a window's scroll bar, this parameter is NULL. The pointer may be temporary and should not be stored for later use.
afx_msg void OnHScroll(
UINT nSBCode,
UINT nPos,
CScrollBar* pScrollBar
);
最后一个参数标示。
pScrollBar
If the scroll message came from a scroll-bar control, contains a pointer to the control. If the user clicked a window's scroll bar, this parameter is NULL. The pointer may be temporary and should not be stored for later use.
void Cexample24Dlg::OnNMThemeChangedScrollbar1(NMHDR *pNMHDR, LRESULT *pResult)
{
// 该功能要求使用 Windows XP 或更高版本。
// 符号 _WIN32_WINNT 必须 >= 0x0501。
// TODO: 在此添加控件通知处理程序代码
*pResult = 0;
}这个是直接双击进入的函数,也可以实现同样的功能吗?
这两种方法哪种更优?