home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Pascal / BPASCAL.700 / D12 / OLE.ZIP / OLETYPES.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-10-01  |  2.7 KB  |  99 lines

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