Autor Beitrag
MarioL
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23

Win XP, Win 7
Delphi 6
BeitragVerfasst: Sa 01.01.11 19:15 
Hallo, ich möchte gern mein Prog mit einem Presenter steuern und habe dazu im Netz so einiges gefunden
wie zum Beispiel folgendes:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
type
  TForm1 = class(TForm)
    procedure Hallo(var Msg: tagMsg); message WM_APPCOMMAND;
  end;

{...}

procedure TForm1.Hallo(var Msg: tagMSG);
begin
  case Msg.wParam of
    720896: ShowMessage('Nächste Folie');
    786432: ShowMessage('Vorherige Folie');
    917504: ShowMessage('Leere Folie');
  end;
end;


leider erhalte ich folgenden Fehler:
undefinierter Bezeichner 'WM_APPCOMMAND',

hat jemand eine Ahnung woran das liegt? evtl. fehlende unit? (benutze Delphi6)

MfG Mario
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Sa 01.01.11 19:20 
Hast Du Messages in Deinen uses?
ausblenden Delphi-Quelltext
1:
2:
  {$EXTERNALSYM WM_APPCOMMAND}
  WM_APPCOMMAND       = $0319;

_________________
Das Problem liegt üblicherweise zwischen den Ohren H₂♂
DRY DRY KISS
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Sa 01.01.11 19:21 
Wie sich in der Forensuche hätte einfach finden lassen, existiert diese Konstante in der Unit Messages - aber erst seit D7 oder so.

In früheren Versionen darf man sich die selber deklarieren:
ausblenden Delphi-Quelltext
1:
WM_APPCOMMAND       = $0319;					


Und ich war zu langsam :(

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
MarioL Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23

Win XP, Win 7
Delphi 6
BeitragVerfasst: Sa 01.01.11 20:31 
Danke

MfG Mario