ProtocolPirate
Programmer
Scrolling my VirtualMode DGV is very sluggish and it gets so far behind that it will continue scrolling long after you stop turning the mouse wheel. All other scrolling is fine, only mouse wheel scrolling is poorly behaved.
I think the problem is that turning the mouse wheel one detent (one click) triggers three *separate* scroll messages. I would like to be able to capture the scroll wheel message, prevent it from automatically turning into scroll messages, and control the scrolling myself directly in the mousewheel event, doing all three scrolls together as a single three row scroll.
Alternately, I could use PeekMessage, but I can't seem to get scrollbar messages for the DGV.Handle, and I can't access a handle for the vertical scrollbar at all.
So how do I prevent the mousewheel message from automatically generating three scroll messages? Or alternately, how can I get messages sent to the DGV's vertical scrollbar?
I think the problem is that turning the mouse wheel one detent (one click) triggers three *separate* scroll messages. I would like to be able to capture the scroll wheel message, prevent it from automatically turning into scroll messages, and control the scrolling myself directly in the mousewheel event, doing all three scrolls together as a single three row scroll.
Alternately, I could use PeekMessage, but I can't seem to get scrollbar messages for the DGV.Handle, and I can't access a handle for the vertical scrollbar at all.
So how do I prevent the mousewheel message from automatically generating three scroll messages? Or alternately, how can I get messages sent to the DGV's vertical scrollbar?