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

.Net技术 码拜 10年前 (2014-12-11) 2760次浏览 0个评论
获取窗口句柄,想要改变其大小,现在通过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消息
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!