int the message map
...the problem is that the window doesn't receive the message relative to the vscroll, only relative to the hscroll.
I don't understand what is wrong with the vertical scrollbar...
Thank you a lot:confused:
I created a MyScrollBar class that inherited from CScrollBar, and in this case the WM_SCROLL message has been received from MyScrollBar class, but I don't understand why nPos of the OnVScroll event is always 0.
Could please someone help me?
Thanks a lot...
October 11th, 2013, 07:53 AM
could be many things...
- are you sure the create suceeds ?
- the create doesn't have WS_VISIBLE, so the scrollbar isn't visible ?
- you've not set a vertical scroll range, or the vertical scroll range is less than the height of the window.
October 11th, 2013, 11:26 AM
First, note to avoid further confusion: there are two types of scrollbars in Windows.
Scrollbars for windows having WS_HSCROLL and/or WS_VSCROLL styles.
Scrollbar common controls (of window class "ScrollBar") which are encapsulated by CScrollBar MFC class.