捕捉 Windows WM_WINDOWPOSCHANGING信息和 WindowPos 结构的‘or’标记,它把预先定义了的常数SWP_NOMOVE 和 SWP_NOSIZE 作为信息的lparam参数。
type
TForm1 = class(TForm)
private
procedure WMPosChange(var Message: TWMWINDOWPOSCHANGING);
message WM_WINDOWPOSCHANGING;
public
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure Tform1.WMPosChange(var Message: TWMWINDOWPOSCHANGING);
begin
PWindowPos(TMessage(Message).lParam).Flags :=
PWindowPos(TMessage(Message).lParam).Flags or
SWP_NOMOVE or SWP_NOSIZE;
end;
转载于:https://www.cnblogs.com/myamanda/articles/1523942.html