重载WM_H(V)SCROLL消息:
WM_HSCROLL
nScrollCode = (int) LOWORD(wParam); // scroll bar value
nPos = (short int) HIWORD(wParam); // scroll box position
hwndScrollBar = (HWND) lParam; // handle to scroll bar
然后对不同的nScrollCode作相应处理。可以查查MSDN吧。
WM_HSCROLL
nScrollCode = (int) LOWORD(wParam); // scroll bar value
nPos = (short int) HIWORD(wParam); // scroll box position
hwndScrollBar = (HWND) lParam; // handle to scroll bar
然后对不同的nScrollCode作相应处理。可以查查MSDN吧。
我的scrollbar是在mainframe中的oncreat函数中创建的。还有,我怎么在资源里找不到我添加
的scrollbar。我是初学者。麻烦你能不能给我说详细点。谢谢。