正确的消息处理过程如下,上面作废
procedure TFormRunWiz.WMNChitTest(var Msg: TWMNChitTest);
begin
inherited;
if Msg.Result = htClient then
Msg.Result := htCaption;
end;
procedure TFormRunWiz.WMNChitTest(var Msg: TWMNChitTest);
begin
inherited;
if Msg.Result = htClient then
Msg.Result := htCaption;
end;
Good Luck!
var Ctrl: TControl;
P: TPoint;
begin
P.x := Msg.XPos;
P.y := Msg.YPos;
P := ScreenToClient(P);
Ctrl := ControlAtPos(P, False);
if Ctrl = Button1 then
Msg.Result := HTCLIENT
else if Ctrl = label1 then
Msg.Result := HTCAPTION
else
inherited;
end;