Menus - criando itens no systemmenu |
Top Previous Next |
|
const SC_TESTE = $1000;
implementation
procedure TForm1.Button1Click(Sender: TObject); begin AppendMenu(GetSystemMenu(Handle,False), MF_STRING, SC_TESTE, '&Teste'); end;
procedure TForm1.WMSysCommand(var Msg: TWMSysCommand); begin if Msg.CmdType = SC_TESTE then ShowMessage('Opcao teste foi selecionada') else inherited; end;
procedure TForm1.Button2Click(Sender: TObject); begin GetSystemMenu(Handle,True); // Volta menu original end; |