Stop MouseWheel from autogenerating scroll msgs?
I have a VirtualMode DataGridView that bogs down on using the mouse wheel to scroll and gets a backlog of messages such that it continues to scroll long after ceasing to turn the mouse wheel. This is because instead of generating one scrollbar message for each mouse wheel message it generates a separate scrollbar message for each line move, forcing the entire screen to refresh with each line added.
I've put in code to scroll multiple lines only once for each mouse wheel click, but I'm still having to shunt out all of the extra scrollbar messages and it is not easy. If I get out of sync as to how many scrollbar messages to shunt the scrolling goes out of whack. It would be far easier if I just didn't have to worry about shunting these useless messages.
So how do you prevent mouse wheel messages from creating scrollbar messages?
|