This question was asked 3 years ago on this forum, without an answer. Perhaps there is one today. I'm converting from Delphi to Lazarus. In one unit, on a mouse up event, I have:
const
WM_Selected = WM_App + 100;
begin
SendMessage(Application.Handle, WM_Selected, 0, 0);
in another unit I have:
function TMyApp.AppWindowHook(var Message: TMessage): Boolean;
begin
if message.msg = WM_Selected then
DoSomething;
end;
procedure TMyApp.FormShow(Sender: TObject);
begin
Application.HookMainWindow(AppWindowHook);
end;
procedure TMyApp.FormDestroy(Sender: TObject);
begin
Application.UnhookMainWindow(AppWindowHook);
end;
Lazaraus can not compile MyApp - Error: identifier idents no member "HookMainWindow", etc.
How can I do this is Lazarus. Is there another unit I need in Uses?