Click here to Skip to main content
15,920,031 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When a user clicks on the vertical scrollbar in a multiline edit box, the EN_VSCROLL notification is sent. How can I get notification when the scrollbar thumb is dragged?
Posted

Unfortunately, so it seems - this is something you can't have.

Reviewing the docs for EN_VSCROLL here: MSDN>EN_VSCROLL notification code we find the following gem:


Remarks
This message is sent for the following mouse events on the vertical scroll bar: clicking either arrow button or clicking between the arrow button and the thumb. However, the message is not sent when clicking the scroll bar mouse itself.(sic - I think mouse should be thumb) The message is also sent when a keyboard event causes a change in the view area of the edit control, for example, pressing HOME, END, PAGE UP, PAGE DOWN, UP ARROW, or DOWN ARROW.


So, since you have to click on the thumb in order to drag it AND since notifications don't get fired when "clicking the scroll bar mouse itself", you don't get any. You can catch line-up/page-up and line-down/page-down events, but even then, you don't get told which type of event it was - merely that a scroll event happened. :(
 
Share this answer
 
you can capture WM_VSCROLL message to solve.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900