unit PdxDeskW;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Menus;

type
  Tf_ParadoxDesktop = class(TForm)
    pmFile: TPopupMenu;
    lFile: TLabel;
    pmFileOpen: TPopupMenu;
    lFileOpen: TLabel;
    pmFileNew: TPopupMenu;
    lFileNew: TLabel;
    pmTools: TPopupMenu;
    lTools: TLabel;
    pmUtilities: TPopupMenu;
    lUtilities: TLabel;
    Label1: TLabel;
    pmHelp: TPopupMenu;
  private
    { Private declarations }
  public
    { Public declarations }
    Procedure RegisterMenus;
  end;

var
  ParadoxDesktop: Tf_ParadoxDesktop;

implementation

{$R *.DFM}

Uses PdxAddIn, iAddIn;

{ --------------------------------------------------------------------- }
{ This routine walks through each of the popup menus and registers each }
{ menu item with Paradox to display at the appropriate menu node }

Procedure Tf_ParadoxDesktop.RegisterMenus;
Begin
  With Paradox do
    Begin
      ClearMenus; { Clear all prior registered menu items }
      RegisterMenu( pdxmFile, pmFile );
      RegisterMenu( pdxmFileOpen, pmFileOpen );
      RegisterMenu( pdxmFileNew, pmFileNew );
      RegisterMenu( pdxmTools, pmTools );
      RegisterMenu( pdxmUtilities, pmUtilities );
      RegisterMenu( pdxmHelp, pmHelp );
    End;
End;

Initialization { On startup }

  ParadoxDesktop := Tf_ParadoxDesktop.Create(Nil);

  { Do not SHOW this form }
  With ParadoxDesktop do
    Begin
      RegisterMenus;
    End;

Finalization { On termination }

  ParadoxDesktop.Free;

end.

