WM_WINDOWPOSCHANGING 消息

        这个消息根据MSDN上介绍,改变大小、位置、Z-order顺序的时候。

        The WM_WINDOWPOSCHANGING message is sent to a window whose size, position, or place in the Z order is about to change as a result of a call to the SetWindowPos function or another window-management function.

        其中,lParam指向WINDOWPOS结构体,这个结构中包含窗口的新信息。所以从以下这句话可以看出:

While this message is being processed, modifying any of the values in WINDOWPOS affects the window's new size, position, or place in the Z order. An application can prevent changes to the window by setting or clearing the appropriate bits in the flags member of WINDOWPOS. 需要改变一个窗口的属性的时候,需要修改这个参数,不能使           用局部的WINDOWPOS

               WINDOWPOS* pPos = (LPWINDOWPOS)lParam;  有效

               WINDOWPOS pso = (WINDOWPOS)(*lParam); 无效


       其中SetWindowPos的参数与WINDOWPOS结构体的参数是一致的

            flags 的可取值

SWP_NOSENDCHANGING 的设置并不会阻止窗口对该消息的接收,只是接收的消息中位置相关的参数会清零,并且最后的标志位会是 SWP_NOMOVE | SWP_NOSIZE

           hWndInsertAfter

                不可以为NULL,必须是窗口句柄或者是HWND_XX的一个参数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值