• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

referring scroll

I have a rich control created initially without vscroll.
after I send the message
::ShowScrollBar((HWND)m_Rich, SB_VERT, TRUE);
and the scroll bar appears. But If I try to move it with mouse it remains always at top position although the contents of rich window scrolls. How can I make the scroll have a normal behaviour?
1 Solution
How about setting the parameters of the scrollbar (top,bottom positions, etc.)?

This is not a 'C' question.  Next time, try the windows programming area.
well thats because u did not over the WM_VSCROLL function
u probably using VC++ ?

if so use this answer use the one below:

and in that function you'll get pointer to a scroll bar, if u have only one scroll bar thats the one you'll get pointer to, if not u have to cast the one u want to use.

now u have a pointer to the scroll bar, and it'll do all CSCrollBar class alloowed you to.


in your message loop check this:
   the lParam is the pointer to the scrollbar you suppose to do the same as the example of the VC++ cast it or use it


i m sure its confussing, start with it, and i'll guide you through it.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free tool for managing users' photos in Office 365

Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now