Capture vertical scroll event in CRichEditView

farshizzo
farshizzo used Ask the Experts™
on
Hi,

My application is using CRichEditView and I want to know whenever the contents of the window are vertically scrolled, either by the user clicking on the scroll bar, using the mouse wheel, or using the arrow keys to move down.  Is there an event that captures all this and just this, or do I need to handle multiple events?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
No one event as far as I know ... but you can handle all three with your own function.

Create a function Called HandleScroll () and use it in the following three events.

In Class Wizard.. Select you CRichEditView in the ClassName ComboBox

Scroll down the message listbox and double click WM_VSCROLL
All Scrolling using the ScrollBar will come in here.

Scroll up the message listbox  and double click WM_KEYUP
Handle the arrow keys here.

Scroll down and Find WM_MOUSEWHEEL, double click... this is the wheel event.



Propably not what you wnated to hear :)

Author

Commented:
That's what I figured.  There is another message, EN_VSCROLL that captures pretty much everything except dragging the scrollbar, which WM_VSCROLL handles.  If nobody else posts a better solution I'll accpet your answer william.

Author

Commented:
That's what I figured.  There is another message, EN_VSCROLL that captures pretty much everything except dragging the scrollbar, which WM_VSCROLL handles.  If nobody else posts a better solution I'll accpet your answer william.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial