https://github.com/hemulgm/fmxwindowsdispatch
Allow the FMX windows to process Windows messages
https://github.com/hemulgm/fmxwindowsdispatch
Last synced: 7 months ago
JSON representation
Allow the FMX windows to process Windows messages
- Host: GitHub
- URL: https://github.com/hemulgm/fmxwindowsdispatch
- Owner: HemulGM
- License: mit
- Created: 2024-06-08T14:37:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-29T17:29:23.000Z (10 months ago)
- Last Synced: 2025-01-10T12:34:17.136Z (9 months ago)
- Language: Pascal
- Homepage:
- Size: 82 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FMXWindowsDispatch
Add to form message event
```pascal
type
TForm5 = class(TForm)
Label1: TLabel;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
procedure WMSize(var Message: TWMSize); message WM_SIZE;
end;...
procedure TForm5.WMSize(var Message: TWMSize);
begin
Label1.Text := Message.Width.ToString + ':' + Message.Height.ToString;
end;
```Add unit to uses
```pascal
uses
FMX.Windows.Dispatch;
```And call AllowDispatchWindowMessages procedure when creating a window
```pascal
procedure TForm5.FormCreate(Sender: TObject);
begin
AllowDispatchWindowMessages(Self);
end;
```