home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / DELPHI / 3DCTL / CTL3DAPP.PAS < prev    next >
Pascal/Delphi Source File  |  1995-04-27  |  2KB  |  62 lines

  1. program Ctl3DApp;
  2.  
  3. {---------------------------------------------------------------------
  4. Example application for the Ctl3D control (Ctl3DS.DLL) of
  5. the SMWCC 2.0 Custom Control Pack
  6.  
  7. Copyright (C) by Sebastian Modersohn
  8.  
  9. Note: This code file isn't documented into detail. If you have
  10.       questions to *THIS* code file or want to know some details
  11.       please contact me via CompuServe, ID 100340,1474.
  12. ---------------------------------------------------------------------}
  13.  
  14. {$IFNDEF AUTOLOAD}
  15.  
  16.   You HAVE to compile this program with the global defined symbol "AUTOLOAD" !
  17.   This demonstrates the autoloading feature of the import unit Ctl3d!
  18. {$ENDIF}
  19.  
  20. {$R Ctl3DApp}
  21.  
  22. uses WinTypes, WinProcs, WinDos, OWindows, ODialogs, Strings,
  23.      {the interface unit (only for autoloading the DLL)
  24.       and its constant unit}
  25.      Ctl3d, Ctl3dCo;
  26.  
  27. type
  28.   pMainWindoww = ^tMainWindoww;
  29.   tMainWindoww = object(tDlgWindow)
  30.     procedure Help(var Msg: TMessage);
  31.       virtual id_First + 998;
  32.   end;
  33.  
  34. {App initializes the main window}
  35.   pCtl3DApp = ^tCtl3DApp;
  36.   tCtl3DApp = object(tApplication)
  37.     procedure InitMainWindow; virtual;
  38.   end;
  39.  
  40. { tMainWindoww }
  41.  
  42. procedure TMainWindoww.Help(var Msg: TMessage);
  43. begin
  44.   WinHelp(HWindow, HelpFile, Help_Context, 100);
  45. end;
  46.  
  47. { TCtl3DApp }
  48.  
  49. procedure TCtl3DApp.InitMainWindow;
  50. begin
  51.   MainWindow := New(PMainWindoww, Init(nil, 'dlg_main'));
  52. end;
  53.  
  54. var
  55.   App: TCtl3DApp;
  56.  
  57. begin
  58.   App.Init('Ctl3DS Demo');
  59.   App.Run;
  60.   App.Done;
  61. end.
  62.