Code Bye

使用winapi的 SendMessage 方法发送WM_SIZE消息

获取窗口句柄,想要改变其大小,现在通过WM_SIZE类型的消息,方法定义如下:
[DllImport(“user32.dll”, EntryPoint = “SendMessageA”)]
public static extern int SendMessage (IntPtr hwnd, int wMsg, int wParam, int lParam);
可是窗体的宽度和高度怎么传递。
lParam:
The low-order word of lParamspecifies the new width of the client area.
The high-order word of lParam specifies the new height of the client area.
查了一下,说lParam这个参数,低位表示宽度,高位表示高度,不知道怎么传递,有谁知道怎么解决的?

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明使用winapi的 SendMessage 方法发送WM_SIZE消息