0

In my application i want to use hints to show additional information.

It looks like this:

enter image description here

I noticed that Firefox shows hints without the dropshadow:

enter image description here

My research on google only brought me to questions about adding a dropshadow (XP days) and not removing them.

So my question is: How can i remove the dropshadow from hints? Thanks.

manlio
  • 18,345
  • 14
  • 76
  • 126
Tommy
  • 596
  • 6
  • 30

1 Answers1

4

You just create your own hint window class inheriting from THintWindow, remove CS_DROPSHADOW in CreateParams and then set vcl to use your class instead of default.

TMyHintWindow = class(THintWindow)
protected
  procedure CreateParams(var Params: TCreateParams); override;
end;

procedure TMyHintWindow.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  Params.WindowClass.Style := Params.WindowClass.style and not CS_DROPSHADOW;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  FOldHint := HintWindowClass;
  HintWindowClass := TMyHintWindow;
  // FOldHint is type of THintWindowClass;
  // If you like to reset hint window to its original value you just set it back to FOldHint
  // HintWindowClass := FOldHint;
end;
J.Pelttari
  • 516
  • 3
  • 6