Scalabium Software

SMExport/SMImport suites
Knowledge for your independence'.
Home Delphi and C++Builder tips


#30: How can I add the item into system menu?

Sometimes I must insert a new items into system menu of some form. I think that I such not one...

type TyourForm = class(TForm)
  private
    { Private declarations }
    procedure wmSysCommand(var Message:TMessage); message WM_SYSCOMMAND;
  end;

const
  ID_ABOUT  = Word(-1);

implementation

procedure TyourForm.wmSysCommand;
begin
  if Message.wParam = ID_ABOUT then
  begin
     <some actions>
  end;

  inherited;
end;

procedure TyourForm.FormCreate(Sender: TObject);
var sysMenu: THandle;
begin
  sysMenu := GetSystemMenu(Handle, False);

  AppendMenu(sysMenu, MF_SEPARATOR, Word(-1), '');
  AppendMenu(sysMenu, MF_BYPOSITION, ID_ABOUT, 'About...');
end;


Published: October 7, 1999

See also
 
Metafile Convert
Paradox to MS Access converter
Protected Storage Viewer
Mail parser (ActiveX)
ABA Database Convert
DBISAM Password Recovery
Fast Document Viewer
Clarion Viewer
SMExport suite
SMDBGrid
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2017, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport/SMImport suites