Reputation: 656
In my application i want to use hints to show additional information.
It looks like this:
I noticed that Firefox shows hints without the dropshadow:
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.
Upvotes: 0
Views: 490
Reputation: 516
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;
Upvotes: 4