home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 August / VPR9708A.ISO / D3TRIAL / INSTALL / DATA.Z / delphi32.exe / RCDATA / MODULES < prev    next >
Text File  |  1997-05-14  |  6KB  |  334 lines

  1. unit %s;
  2.  
  3. interface
  4.  
  5. implementation
  6.  
  7. end.
  8. |unit %s;
  9.  
  10. interface
  11.  
  12. uses
  13.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
  14.  
  15. type
  16.   T%s = class(T%s)
  17.   private
  18.     { Private 宣言 }
  19.   public
  20.     { Public 宣言 }
  21.   end;
  22.  
  23. var
  24.   %1:s: T%1:s;
  25.  
  26. implementation
  27.  
  28. {$R *.DFM}
  29.  
  30. end.
  31. |unit %s;
  32.  
  33. interface
  34.  
  35. uses
  36.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
  37.  
  38. type
  39.   %s = class(%s)
  40.   private
  41.     { Private 宣言 }
  42.   protected
  43.     { Protected 宣言 }
  44.   public
  45.     { Public 宣言 }
  46.   published
  47.     { Published 宣言 }
  48.   end;
  49.  
  50. procedure Register;
  51.  
  52. implementation
  53.  
  54. procedure Register;
  55. begin
  56.   RegisterComponents('%s', [%1:s]);
  57. end;
  58.  
  59. end.
  60. |unit %0:s;
  61.  
  62. interface
  63.  
  64. uses
  65.   ComObj, %3:s;
  66.  
  67. type
  68.   T%1:s = class(TAutoObject, I%1:s)
  69.   protected
  70.   end;
  71.  
  72. implementation
  73.  
  74. uses ComServ;
  75.  
  76. initialization
  77.   TAutoObjectFactory.Create(ComServer, T%1:s, Class_%1:s, %2:s);
  78. end.
  79. |unit %0:s;
  80.  
  81. interface
  82.  
  83. uses
  84.   Classes;
  85.  
  86. type
  87.   %1:s = class(TThread)
  88.   private
  89.     { Private 宣言 }
  90.   protected
  91.     procedure Execute; override;
  92.   end;
  93.  
  94. implementation
  95.  
  96. { Important: Methods and properties of objects in VCL can only be used in a
  97.   method called using Synchronize, for example,
  98.  
  99.  注意: VCL のメソッド/関数/プロパティを扱うには、以下のように 
  100.    Synchronize メソッドの引数として渡したメソッドの中から扱う必要があります。
  101.  
  102.       Synchronize(UpdateCaption);
  103.  
  104.    and UpdateCaption could look like,
  105.    UpdateCaption の中では以下のように VCL を呼び出すことができます。
  106.  
  107.     procedure %1:s.UpdateCaption;
  108.     begin
  109. //    Form1.Caption := 'Updated in a thread';
  110.       Form1.Caption := 'スレッドから書き換えました';
  111.     end; }
  112.  
  113. { %1:s }
  114.  
  115. procedure %1:s.Execute;
  116. begin
  117.   { Place thread code here }
  118.   { スレッドとして実行したいコードをここに記述 }
  119. end;
  120.  
  121. end.
  122. |program %s;
  123.  
  124. uses
  125.   Forms;
  126.  
  127. {$R *.RES}
  128.  
  129. begin
  130.   Application.Initialize;
  131.   Application.Run;
  132. end.
  133. |library |;
  134.  
  135. uses
  136.   ShareMem,
  137. |  LibMain;
  138.  
  139. |
  140. exports
  141.   InitLibrary name LibrarySignature;
  142.  
  143. begin
  144. |end.
  145. |library %s;
  146.  
  147. { DLL でのメモリ管理について:
  148.   もしこの DLL が引数や返り値として String 型を使う関数/手続きを
  149.   エクスポートする場合、以下の USES 節とこの DLL を使うプロジェクトソースの
  150.   USES 節の両方に、最初に現れるユニットとして ShareMem を指定しなけれ
  151.   ばなりません。
  152.   これは構造体やクラスに埋め込まれている場合も含め String 型を DLL
  153.   とやり取りする場合に必ず必要となります。
  154.   ShareMem は共用メモリマネージャである DELPHIMM.DLL とのインターフェース
  155.   です。あなたの DLL と一緒に配布する必要があります。
  156.   DELPHIMM.DLL を使うのを避けるには、PChar または ShortString 型を
  157.   使って文字列のやり取りをおこなってください。}
  158.  
  159. uses
  160.   SysUtils,
  161.   Classes;
  162.  
  163. begin
  164. end.
  165. |package |;
  166.  
  167. |{$DESCRIPTION |}
  168. |{$RUNONLY}
  169. |{$DESIGNONLY}
  170. |requires
  171.   |contains
  172.   |
  173. end.
  174. |library %s;
  175.  
  176. uses
  177.   ComServ;
  178.  
  179. exports
  180.   DllGetClassObject,
  181.   DllCanUnloadNow,
  182.   DllRegisterServer,
  183.   DllUnregisterServer;
  184.  
  185. {$R *.RES}
  186.  
  187. begin
  188. end.
  189. |unit %0:s;
  190.  
  191. interface
  192.  
  193. uses
  194.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  195.   ActiveX, AxCtrls, %2:s;
  196.  
  197. type
  198.   T%1:s = class(TActiveForm)
  199.   private
  200.     { Private 宣言 }
  201.     FEvents: I%1:sEvents;
  202.   protected
  203.     { Protected 宣言 }
  204.     procedure EventSinkChanged(const EventSink: IUnknown); override;
  205.     procedure Initialize; override;
  206.   public
  207.     { Public 宣言 }
  208.   end;
  209.  
  210. implementation
  211.  
  212. uses ComServ;
  213.  
  214. {$R *.DFM}
  215.  
  216. { T%1:s }
  217.  
  218. procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
  219. begin
  220.   FEvents := EventSink as I%1:sEvents;
  221. end;
  222.  
  223. procedure T%1:s.Initialize;
  224. begin
  225. end;
  226.  
  227. initialization
  228.   TActiveFormFactory.Create(
  229.     ComServer,
  230.     TActiveFormControl,
  231.     T%1:s,
  232.     Class_%1:s,
  233.     %3:d,
  234.     '%4:s',
  235.     OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL);
  236. end.
  237. |unit %0:s;
  238.  
  239. interface
  240.  
  241. uses
  242.   Windows, ActiveX, Classes, Controls, Graphics, Menus, Forms, StdCtrls,
  243.   ComServ, StdVCL, AXCtrls, %3:s;
  244.  
  245. type
  246.   T%1:s = class(TActiveXControl)
  247.   private
  248.     { Private 宣言 }
  249.     FDelphiControl: %2:s;
  250.     FEvents: I%1:sEvents;
  251.   protected
  252.     { Protected 宣言 }
  253.     procedure InitializeControl; override;
  254.     procedure EventSinkChanged(const EventSink: IUnknown); override;
  255.     procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
  256.   end;
  257.  
  258. implementation
  259.  
  260. { T%1:s }
  261.  
  262. procedure T%1:s.InitializeControl;
  263. begin
  264.   FDelphiControl := Control as %2:s;
  265. end;
  266.  
  267. procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
  268. begin
  269.   FEvents := EventSink as I%1:sEvents;
  270. end;
  271.  
  272. procedure T%1:s.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
  273. begin
  274.   { Define property pages here.  Property pages are defined by calling
  275.     DefinePropertyPage with the class id of the page.  For example,
  276.       DefinePropertyPage(Class_%1:sPage); }
  277. end;
  278.  
  279. initialization
  280.   TActiveXControlFactory.Create(
  281.     ComServer,
  282.     T%1:s,
  283.     %2:s,
  284.     Class_%1:s,
  285.     %4:d,
  286.     '%5:s',
  287.     %6:s);
  288. end.
  289. |unit %0:s;
  290.  
  291. interface
  292.  
  293. uses SysUtils, Windows, Messages, Classes, Graphics, Controls, StdCtrls,
  294.   ExtCtrls, Forms, ComServ, ComObj, StdVcl, AxCtrls;
  295.  
  296. type
  297.   T%1:s = class(TPropertyPage)
  298.   private
  299.     { Private 宣言 }
  300.   protected
  301.     procedure UpdatePropertyPage; override;
  302.     procedure UpdateObject; override;
  303.   public
  304.     { Public 宣言 }
  305.   end;
  306.  
  307. const
  308.   Class_%1:s: TGUID = '%2:s';
  309.  
  310. implementation
  311.  
  312. {$R *.DFM}
  313.  
  314. procedure T%1:s.UpdatePropertyPage;
  315. begin
  316.   { Update your controls from OleObject }
  317. end;
  318.  
  319. procedure T%1:s.UpdateObject;
  320. begin
  321.   { Update OleObject from your controls }
  322. end;
  323.  
  324. initialization
  325.   TActiveXPropertyPageFactory.Create(
  326.     ComServer,
  327.     T%1:s,
  328.     Class_%1:s);
  329. end.
  330. |
  331.   TComponentFactory.Create(ComServer, T%s,
  332.     Class_%s, ciMultiInstance);
  333. |
  334.