I’m trying to do a very simple task… Detect when my form has been minimized.
But it seems Firemonkey has absolutely no way of handling this.
I’ve tried to use AllocateHWnd to intercept WM_SYSCOMMAND messages, but all I get is WM_ACTIVATEAPP messages and nothing else.
CreateForm:
AllocateHWnd(WndProcHandler);
WndProcHandler:
procedure TfrmMain.WndProcHandler(var Message: TMessage);
begin
if Message.msg = WM_SYSCOMMAND then
OutputDebugStringA(‘got command’);
end;