Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
|
Respond to Windows messages
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Using WM_WININICHANGED as an example, Chuck Jazdzewski cjaz@borland.com says:
Declaring a method in a TForm will allow you to handle WM_WININICHANGED messages:
 | |  | |
procedure WMWinIniChange(var message: TMessage);
message WM_WININICHANGE;
procedure TForm1.WMWinIniChange(var message: TMessage);
begin
inherited;
end;
| |  | |  |
The call to "inherited" is important. Note also that message handlers are special when calling their inherited since you don't refer to the name of the inherited.
This is because the inherited is referring to the inherited message handler for
this message number, which might not have a visible name or or even the same name as you have given it, or in some cases,
might not even exist (in which case you are really calling DefaultHandler).
Comments:
|