home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / TURBOPASCAL WIN / OWLDEMOS.PAK / OLETYPES.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-06-08  |  2.8 KB  |  101 lines

  1. {***************************************************}
  2. {                                                   }
  3. {   Turbo Pascal for Windows                        }
  4. {   Windows 3.1 OLE Server Demonstration Program    }
  5. {               Types and Constants Unit            }
  6. {                                                   }
  7. {   Copyright (c) 1992 by Borland International     }
  8. {                                                   }
  9. {***************************************************}
  10.  
  11. unit OleTypes;
  12.  
  13. { This unit contains the definition of types and constants
  14.   that are used by more than one unit of the OLE Server
  15.   Demonstration program.
  16.  
  17.   Note: To compile the OLE Server demo, set Compile|Primary File to OLESERVR.PAS
  18. }
  19.  
  20. interface
  21.  
  22. const
  23.  
  24. { Resource IDs }
  25.  
  26.   id_Menu  = 100;
  27.   id_About = 100;
  28.   id_Icon  = 100;
  29.  
  30. { Menu command IDs }
  31.  
  32.   cm_FileNew        = 100;    { File Menu }
  33.   cm_FileOpen       = 101;
  34.   cm_FileSave       = 102;
  35.   cm_FileSaveAs     = 103;
  36.   cm_FileUpdate     = 104;
  37.   cm_EditCopy       = 200;    { Edit Menu }
  38.   cm_ShapeEllipse   = 300;
  39.   cm_ShapeRectangle = 301;
  40.   cm_ShapeTriangle  = 302;
  41.   cm_HelpAbout      = 400;    { Help Menu }
  42.  
  43. { Miscellaneous Constants }
  44.  
  45.   MaxLinks          = 10;     { Max # of Client Links }
  46.  
  47.   ObjX              = 75;     { Defines position and size }
  48.   ObjY              = 50;     { of the shape object.      }
  49.   ObjWidth          = 100;
  50.   ObjHeight         = 100;
  51.  
  52. { Error codes }
  53.  
  54.   olRegClipError  = 182;      { Used within this app to signal errors }
  55.   olInitVTBLError = 183;      { Handled in TOleApp.Error.             }                                  
  56.  
  57. type
  58.  
  59.   TFilename = array [0..255] of Char;
  60.  
  61. { Version Type.  Server applications should store version numbers in their
  62.   Native data formats.  This way a client application may embed data from
  63.   one version of a server and later request a newer version to edit that 
  64.   data.
  65. }
  66.   TVersion = Integer;
  67.  
  68. { Type which defines the different Native data type formats.
  69. }
  70.   TNativeType = (ObjEllipse, ObjRect, ObjTriangle);
  71.  
  72. { Record type which combines the Native type with its version.
  73. }
  74.   PNative = ^TNative;
  75.   TNative = record
  76.     NativeType : TNativeType;
  77.     Version    : TVersion;
  78.   end;
  79.  
  80. { Type which defines the different states of an Ole document.
  81. }
  82.   TDocType = (DoctypeNew,        {Document is untitled}
  83.               DoctypeFromFile,   {Document exists in a file and may be
  84.                                   linked}
  85.               DoctypeEmbedded);  {Document is an embedded document}
  86.  
  87. { Initialized Globals }
  88.  
  89. const
  90.  
  91.  DemoTitle  : PChar = 'OLE Server Demo';
  92.  ClassKey   : PChar = 'OLEServerDemoTPW';
  93.  ClassValue : PChar = 'OLE Demo Object';
  94.  ExeName    : PChar = 'oleservr';
  95.  FileExt    : PChar = 'oos';
  96.  Embedding  : PChar = 'Embedding';
  97.  
  98. implementation
  99.  
  100. end.
  101.