SendMessage() doesnt work

This is a discussion on SendMessage() doesnt work within the C++ Programming forums, part of the General Programming Boards category; Hi to everyone i just have this one question, if this function Code: SendMessage(hwndP, WM_HSCROLL, SB_LINERIGHT, 0); doesnt work, what ...

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    13

    SendMessage() doesnt work

    Hi to everyone i just have this one question, if this function

    Code:
    SendMessage(hwndP, WM_HSCROLL,  SB_LINERIGHT, 0);
    doesnt work, what would be the reason?
    and is there an alternative way or other functions that do the same?

    THANK U VERY MUCH!

  2. #2
    Registered User
    Join Date
    Aug 2010
    Posts
    13
    Code:
    // Double check hwndP, make sure the message is not sent by the scroll bar, or else add the handle of the scroll bar to the lparam.
    
    SendMessage(hwndP, WM_HSCROLL, LOWORD(SB_LINERIGHT), NULL);

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    13
    i read and tried you code still the scrollbar and the page didnt move, the only difference is you used LOWORD it will just retrieves the low-order word and NULL or 0 is OK...

    Quote Originally Posted by iPromise View Post
    // Double check hwndP, make sure the message is not sent by the scroll bar, or else add the handle of the scroll bar to the lparam.
    what do you mean ADD THE HANDLE OF THE SCROLLBAR TO THE LPARAM?

    note: the hwndP is the handle itself to the scrollbar.

    THANK U VERY MUCH!
    Last edited by anne03; 08-23-2010 at 03:34 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcmp returning 1...
    By Axel in forum C Programming
    Replies: 12
    Last Post: 09-08-2006, 08:48 PM
  2. getline() don't want to work anymore...
    By mikahell in forum C++ Programming
    Replies: 7
    Last Post: 07-31-2006, 11:50 AM
  3. Why don't the tutorials on this site work on my computer?
    By jsrig88 in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2006, 11:39 PM
  4. Problems in getting OpenGL to work
    By zonf in forum C Programming
    Replies: 5
    Last Post: 02-13-2006, 04:48 AM
  5. DLL __cdecl doesnt seem to work?
    By Xei in forum C++ Programming
    Replies: 6
    Last Post: 08-21-2002, 05:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21