bsp; begin
p.x := FForm.Left + BoundsRect.Left;
p.y := FForm.Top + BoundsRect.Bottom;
FPopup.Popup(p.x,p.y);
end;
end
else
Result:=CallWindowProc(FOldWndProc,FForm.Handle,Msg,WParam,LParam);
end;
WM_NCLBUTTONUP,WM_LBUTTONUP :
begin
if FButtonDown then
begin
FButtonDown := False;
RePaint;
ReleaseCapture;
if Assigned(FOnClick) then FOnClick(self);
end
else
Result:=CallWindowProc(FOldWndProc,FForm.Handle,Msg,WParam,LParam);
end;
else
Result := CallWindowProc(FOldWndProc,FForm.Handle,Msg,WParam,LParam);
end;
end
else
Result := CallWindowProc(FOldWndProc,FForm.Handle,Msg,WParam,LParam);
end;
end;
procedure TTitleBarButton.SetGlyph(const Value: TBitmap);
begin
FGlyph.Assign(Value);
SendMessage(FForm.Handle,WM_NCACTIVATE,0,0);
end;
procedure TTitleBarButton.SetRightMargin(const Value: Cardinal);
begin
FRightMargin := Value;
SendMessage(FForm.Handle,WM_NCACTIVATE,0,0);
end;
procedure TTitleBarButton.SetVisible(const Value: Boolean);
begin
FVisible := Value;
SendMessage(FForm.Handle,WM_NCACTIVATE,0,0);
end;
procedure TTitleBarButton.Notification(Component: TComponent;
Operation: TOperation);
begin
inheri