Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-06

hexboard2.pas(22, 42) Error: Identifier not found "WM_USER"

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter E Williams

Hi All,

I have been porting a game written in Delphi 5 Enterprise.

I am getting an Identifier not found for WM_USER when assigning it to the WM_USER_APPLICATION_MINIMIZE const. What do I do to correct this error? I am implementing procedure OnUserAppMin(var M: TMessage);

from unit hexboard2.pas

const
  WM_USER_APPLICATION_MINIMIZE = WM_USER + 1;
                                 ^^^^^^^
hexboard2.pas(22,42) Error: Identifier not found "WM_USER"
type
  { Thxboard }
  Thxboard = class(TForm)
//...
  private
    { Private declarations }
    procedure OnUserAppMin(var M: TMessage);
      message WM_USER_APPLICATION_MINIMIZE;
procedure Thxboard.OnUserAppMin(var M: TMessage);
begin
  Application.Minimize;
end; { OnUserAppMin }

Peter

Proudly developing Quality Cross Platform Open Source Games Since 1970 with a Commodore PET 4016 with 16 KRAM http://pews-freeware-games.org (<--- brand new)

Reply by email

Mattias Gaertner
to Peter E Williams
Show quoted text 29 lines
Hi All, I have been porting a game written in Delphi 5 Enterprise. I am getting an Identifier not found for WM_USER when assigning it to the WM_USER_APPLICATION_MINIMIZE const. What do I do to correct this error? I am implementing procedure OnUserAppMin(var M: TMessage); from unit hexboard2.pas const WM_USER_APPLICATION_MINIMIZE = WM_USER + 1; ^^^^^^^ hexboard2.pas(22,42) Error: Identifier not found "WM_USER" type { Thxboard } Thxboard = class(TForm) //... private { Private declarations } procedure OnUserAppMin(var M: TMessage); message WM_USER_APPLICATION_MINIMIZE; procedure Thxboard.OnUserAppMin(var M: TMessage); begin Application.Minimize; end; { OnUserAppMin }

Use Application.AddOnMinimizeHandler instead

Mattias

Reply by email