In einem
NonVCL-Programm sollte das hier
Delphi-Quellcode:
Menu := GetSystemMenu(HWnd, 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, '&wiegehts...');
AppendMenu(Menu, mf_ByCommand, 101, '&Hallo');
am Besten bei der Behandlung von WM_CREATE in der Window-Prozedur des entsprechenden Fensters stehen.
Die Reaktion auf WM_SYSCOMMAND kommt ebenfalls in diese Window-Prozedur.
"Electricity is actually made up of extremely tiny particles called electrons, that you cannot see with the naked eye unless you have been drinking." (Dave Barry)