Hi
I got this neat piece of code froma OpenAI GPT searc
type
TMyHintWindow = class(THintWindow)
protected
procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN;
end;
procedure TMyHintWindow.WMLButtonDown(var Message: TWMLButtonDown);
begin
// Close the hint window when clicked
ReleaseHandle;
end;
I put the first part in the interface section, the second in the implementation.
But the the WMLButtonDown (clic left button, right?) never gets triggered.
What is missing to make it work?
Also, in case I make it work, I lso have set the timerr to hide it after 2 seconds. In the timere I use wh (The TMyHintWindow control)
if wh <> Nil then begin
wh.releasehandle.
wh.free;
wh:=Nil;
end.
How can I make the same inside the WMLButtonDown event?
Thanks very much.
wh