Apr
04
Поймать закрытие - открытие TPopupMenu
20:18unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls, ExPopupList;
type
TForm1 = class(TForm)
PopupMenu1: TPopupMenu;
Memo1: TMemo;
File1: TMenuItem;
private
procedure CMMenuClosed(var msg: TMessage); message CM_MENUCLOSED;
procedure CMEnterMenuLoop(var msg: TMessage);
message CM_ENTERMENULOOP;
procedure CMExitMenuLoop(var msg: TMessage);
message CM_EXITMENULOOP;
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.CMEnterMenuLoop(var msg: TMessage);
begin
memo1.lines.add('Enter menu loop');
end;
procedure TForm1.CMExitMenuLoop(var msg: TMessage);
begin
memo1.lines.add('Exit menu loop');
end;
procedure TForm1.CMMenuClosed(var msg: TMessage);
begin
memo1.lines.add('Menu closed');
end;
end.