Shoutbox

[?] WM_SIZE - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [?] WM_SIZE (/showthread.php?tid=85189)

[?] WM_SIZE by SmokingCookie on 08-04-2008 at 07:31 PM

Window messages.. Quite easy, apart from one: WM_SIZE.

How is the lParam supposed to specify both the width and the height of a window's client area? (I've probably missed something)


RE: [?] WM_SIZE by Mnjul on 08-04-2008 at 07:41 PM

lParam
    The low-order word of lParam specifies the new width of the client area.
    The high-order word of lParam specifies the new height of the client area.

So,
width = lParam & 0xffff;
height = (lParam >> 16) & 0xffff; // or you can use lParam >>> 16;

lParam is dword (double word), of length of 4-byte. A word, in x86 terms, is 2-byte. And little-endian.


RE: [?] WM_SIZE by SmokingCookie on 08-04-2008 at 07:58 PM

That'll do it, thanQ :D