C#.Net: Regarding WM_MOUSEWHEEL & WndProc

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Longkhi
    New Member
    • Jan 2008
    • 11

    C#.Net: Regarding WM_MOUSEWHEEL & WndProc

    Hi.

    I have 2 scrollbars that I want to control by just scrolling one scrollbar. The scrolling function works for both of them, when I override the WndProc method like this:

    protected override void WndProc(ref Message m)
    {
    if (m.Msg == WM_MOUSEWHEEL)
    {
    Console.WriteLi ne("WParam: {0}, LParam: {1}", m.WParam, m.LParam);

    SendMessage(Sch edule2.Handle, WM_MOUSEWHEEL, m.WParam, m.LParam);
    }

    base.WndProc(re f m);
    }

    The problem with this is that the other scrollbar I would like to handle is scrolling way to much compared to the first scrollbar.

    Is there a way, where I can limit this?

    Best regards

    Kim
Working...