Jump to content
  • Advertisement
Sign in to follow this  
wforl

lParam and wParam

This topic is 4208 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!