1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to get mouse movement? e.g. (up, down, left, right)

Discussion in 'Win32' started by anne03, Aug 31, 2010.

  1. anne03

    anne03 New Member

    Joined:
    Aug 31, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi to everyone,

    I need again your help, this is regarding in getting the movement of the MOUSE in the
    window/screen if it goes up, down, left, right, i can do send message to the window to
    move the scrollbar left, right, up and down such as like below, but this is for SCROLLBAR
    what i need now is the movement of the MOUSE if i move it up it will say up state and down then down state.

    Sample code for scrolling the scrollbar by sending message.

    Code:
    //for vertical scrollbar
    SendMessage(hWnd, WM_VSCROLL, SB_LINEUP, SB_PAGEUP);
    SendMessage(hWnd, WM_VSCROLL, SB_LINEDOWN, SB_PAGEDOWN);

    //for horizontal scrollbar
    SendMessage(hWnd, WM_HSCROLL, SB_LINERIGHT, 0);
    SendMessage(hWnd, WM_HSCROLL, SB_LINELEFT, 0);
    I am using VisualC++ Visual Studio 2010 as my IDE and application using Win32

    I need immediate response please and will be appreciated.

    Thank you!
     

Share This Page