Registriert seit: 15. Mai 2003
Ort: München
251 Beiträge
Delphi 7 Architect
|
Re: Menü in der Titelleiste
1. Aug 2005, 15:07
Sag das doch gleich
Delphi-Quellcode:
private
procedure SysCommand( var Msg: TMessage); message wm_SysCommand;
...
procedure TForm1.FormCreate(Sender: TObject);
var Menu: THandle;
begin
Menu := GetSystemMenu( Handle, False);
ModifyMenu(Menu, sc_Close, mf_ByCommand, sc_Close, ' E&xit'#9' Alt+F4');
AppendMenu(Menu, mf_Separator, 0, #0);
AppendMenu(Menu, mf_ByCommand, 100, ' &huhu...');
AppendMenu(Menu, mf_ByCommand, 101, ' &kuckuck');
end;
procedure TForm1.SysCommand( var Msg: TMessage);
begin
inherited;
if Msg.wParam = 100 then ShowMessage(' HuHu');
if Msg.wParam = 101 then ShowMessage(' Kuckuck');
end;
|
|
Zitat
|