Sign in to follow this  
wforl

lParam and wParam

Recommended Posts

Is there any reason why these lines of code wont work, the code is located in my WP_PaINT case, in the wndproc for that window,
wsprintf(myText,TEXT("screen size %d %d"), LOWORD (lParam), HIWORD (lParam));

MessageBox(hwnd, myText, TEXT("Display screen size"), NULL); 
when ever i cause my window to repaint such as moveing it, the message box display s screen size 0 0 i thought that LOWORD lParam = x window size, HIWORD lParam = y window size, and LOWORD wParam = what mouse is doing to scroll bar HIWORD wParam = mouse co-ordinates?? so shouldn'nt my code retrun my screen size in messagebox, when ever the repaint is called, ive looked this up on msdn, but it says ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/shellcc/platform/shell/reference/callbackfunctions/lpfndfmcallback.htm wParam Additional information. See the individual notification pages for specific requirements. lParam Additional information. See the individual notification pages for specific requirements. what are individual notification pages?

Share this post


Link to post
Share on other sites
ahh that would explain it then !!

i didn't know that each case only uses some parts of the wndprocess arguements,


thanks

Share this post


Link to post
Share on other sites
It's not that each message only uses some of the arguments. It's that the WPARAM and LPARAM have different meanings and use for each message.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this