⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wizards_3.htm

📁 对于学习很有帮助
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>怎样编写DELPHI向导(三)</title>
</head>

<body bgcolor="#FFFFFF" text="#000000">

<p align="center"><big><big><big>怎样编写DELPHI向导(三)</big></big></big></p>

<p>发信人:&nbsp;strayli&nbsp;(stray),&nbsp;信区:&nbsp;Delphi&nbsp;<br>
标&nbsp;&nbsp;题:&nbsp;How&nbsp;to&nbsp;write&nbsp;Delphi&nbsp;wizard(3)&nbsp;<br>
发信站:&nbsp;BBS&nbsp;水木清华站&nbsp;(Thu&nbsp;Nov&nbsp;&nbsp;5&nbsp;22:02:23&nbsp;1998)&nbsp;<b><font
color="#00FF00">WWW-POST</font></b>&nbsp;<br>
&nbsp;<br>
returns&nbsp;True&nbsp;if&nbsp;the&nbsp;named&nbsp;file&nbsp;is&nbsp;currently&nbsp;open.&nbsp; 
&nbsp;<br>
GetNewModuleName &nbsp;<br>
Automatically&nbsp;generates&nbsp;a&nbsp;valid&nbsp;Filename&nbsp;and&nbsp;Unit&nbsp;identifier.&nbsp;Uses&nbsp;the&nbsp;same&nbsp;&nbsp;<br>
mechanism&nbsp;as&nbsp;used&nbsp;by&nbsp;the&nbsp;IDE.&nbsp; &nbsp;<br>
Component&nbsp;library&nbsp;interface&nbsp; &nbsp;<br>
&nbsp;<br>
GetModuleCount &nbsp;<br>
Returns&nbsp;the&nbsp;number&nbsp;of&nbsp;currently&nbsp;installed&nbsp;modules&nbsp;in&nbsp;the&nbsp;component&nbsp;library.&nbsp; 
&nbsp;<br>
GetModuleName &nbsp;<br>
Returns&nbsp;then&nbsp;name&nbsp;of&nbsp;the&nbsp;module&nbsp;given&nbsp;its&nbsp;index.&nbsp; 
&nbsp;<br>
GetComponentCount &nbsp;<br>
Returns&nbsp;the&nbsp;number&nbsp;of&nbsp;components&nbsp;installed&nbsp;in&nbsp;a&nbsp;particular&nbsp;module.&nbsp; 
&nbsp;<br>
GetComponentName &nbsp;<br>
Returns&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;component&nbsp;given&nbsp;its&nbsp;module&nbsp;index&nbsp;and&nbsp;index&nbsp;in&nbsp;that&nbsp;&nbsp;<br>
module.&nbsp; &nbsp;<br>
Error&nbsp;handling&nbsp; &nbsp;<br>
&nbsp;<br>
RaiseException &nbsp;<br>
This&nbsp;will&nbsp;cause&nbsp;an&nbsp;Exception&nbsp;to&nbsp;be&nbsp;raised&nbsp;with&nbsp;the&nbsp;IDE&nbsp;with&nbsp;the&nbsp;string&nbsp;passed&nbsp;&nbsp;<br>
to&nbsp;this&nbsp;function.&nbsp;NOTE:&nbsp;This&nbsp;will&nbsp;cause&nbsp;the&nbsp;stack&nbsp;to&nbsp;unwind&nbsp;and&nbsp;control&nbsp;will&nbsp;&nbsp;<br>
NOT&nbsp;return&nbsp;to&nbsp;this&nbsp;point.&nbsp;It&nbsp;is&nbsp;the&nbsp;resposibility&nbsp;of&nbsp;the&nbsp;Library&nbsp;to&nbsp;be&nbsp;sure&nbsp;&nbsp;<br>
it&nbsp;has&nbsp;correctly&nbsp;handled&nbsp;the&nbsp;error&nbsp;condition&nbsp;before&nbsp;calling&nbsp;this&nbsp;procedure.&nbsp; 
&nbsp;<br>
TIToolInterface&nbsp;for&nbsp;Delphi&nbsp;2.0x&nbsp;and&nbsp;3 &nbsp;<br>
Delphi&nbsp;2.0x&nbsp;and&nbsp;3&nbsp;have&nbsp;an&nbsp;expanded&nbsp;Open&nbsp;Tools&nbsp;API&nbsp;(compared&nbsp;to&nbsp;Delphi&nbsp;1.x),&nbsp;&nbsp;<br>
which&nbsp;is&nbsp;not&nbsp;only&nbsp;reflected&nbsp;in&nbsp;a&nbsp;few&nbsp;new&nbsp;methods&nbsp;for&nbsp;TIExpert,&nbsp;but&nbsp;especially&nbsp;&nbsp;<br>
for&nbsp;TIToolServices.&nbsp;The&nbsp;following&nbsp;additional&nbsp;methods&nbsp;are&nbsp;new&nbsp;and&nbsp;for&nbsp;the&nbsp;&nbsp;<br>
32-bits&nbsp;versions&nbsp;of&nbsp;Delphi&nbsp;only&nbsp;(methods&nbsp;that&nbsp;are&nbsp;shared&nbsp;with&nbsp;Delphi&nbsp;1.0&nbsp;have&nbsp;&nbsp;<br>
been&nbsp;left&nbsp;out&nbsp;for&nbsp;now):&nbsp; &nbsp;<br>
&nbsp;<br>
&nbsp;<br>
TIToolServices&nbsp;=&nbsp;class(TInterface) &nbsp;<br>
public &nbsp;<br>
&nbsp;&nbsp;{&nbsp;Action&nbsp;interfaces&nbsp;} &nbsp;<br>
&nbsp;&nbsp;function&nbsp;CreateModuleEx(const&nbsp;ModuleName,&nbsp;FormName,&nbsp;AncestorClass, 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;FileSystem:&nbsp;string;&nbsp;Source,&nbsp;Form:&nbsp;TIStream; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;CreateFlags:&nbsp;TCreateModuleFlags):&nbsp;TIModuleInterface;&nbsp;virtual; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;{&nbsp;Project/UI&nbsp;information&nbsp;} &nbsp;<br>
&nbsp;&nbsp;function&nbsp;EnumProjectUnits(EnumProc:&nbsp;TProjectEnumProc;&nbsp;Param:&nbsp;Pointer):&nbsp;&nbsp;<br>
Boolean; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;{&nbsp;Virtual&nbsp;File&nbsp;system&nbsp;interfaces&nbsp;} &nbsp;<br>
&nbsp;&nbsp;function&nbsp;RegisterFileSystem(AVirtualFileSystem:&nbsp;TIVirtualFileSystem):&nbsp;&nbsp;<br>
Boolean; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;&nbsp;function&nbsp;UnRegisterFileSystem(const&nbsp;Ident:&nbsp;string):&nbsp;Boolean;&nbsp;virtual; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;&nbsp;function&nbsp;GetFileSystem(const&nbsp;Ident:&nbsp;string):&nbsp;TIVirtualFileSystem;&nbsp;virtual; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;{&nbsp;Editor&nbsp;Interfaces&nbsp;} &nbsp;<br>
&nbsp;&nbsp;function&nbsp;GetModuleInterface(const&nbsp;FileName:&nbsp;string):&nbsp;TIModuleInterface; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;&nbsp;function&nbsp;GetFormModuleInterface(const&nbsp;FormName:&nbsp;string):&nbsp;TIModuleInterface; 
&nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;{&nbsp;Menu&nbsp;Interfaces&nbsp;} &nbsp;<br>
&nbsp;&nbsp;function&nbsp;GetMainMenu:&nbsp;TIMainMenuIntf;&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; 
&nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;{&nbsp;Notification&nbsp;registration&nbsp;} &nbsp;<br>
&nbsp;&nbsp;function&nbsp;AddNotifier(AddInNotifier:&nbsp;TIAddInNotifier):&nbsp;Boolean; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;&nbsp;function&nbsp;RemoveNotifier(AddInNotifier:&nbsp;TIAddInNotifier):&nbsp;Boolean; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;{&nbsp;Pascal&nbsp;string&nbsp;handling&nbsp;functions&nbsp;} &nbsp;<br>
&nbsp;&nbsp;function&nbsp;NewPascalString(Str:&nbsp;PChar):&nbsp;Pointer;&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;procedure&nbsp;FreePascalString(var&nbsp;Str:&nbsp;Pointer);&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;procedure&nbsp;ReferencePascalString(var&nbsp;Str:&nbsp;Pointer);&nbsp;virtual;&nbsp;stdcall;&nbsp;&nbsp;<br>
abstract; &nbsp;<br>
&nbsp;&nbsp;procedure&nbsp;AssignPascalString(var&nbsp;Dest,&nbsp;Src:&nbsp;Pointer);&nbsp;virtual; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;stdcall;&nbsp;abstract; &nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;{&nbsp;Configuration&nbsp;Access&nbsp;} &nbsp;<br>
&nbsp;&nbsp;function&nbsp;GetBaseRegistryKey:&nbsp;string;&nbsp;virtual;&nbsp;stdcall;&nbsp;abstract; 
&nbsp;<br>
end; &nbsp;<br>
&nbsp;<br>
The&nbsp;following&nbsp;ToolServices&nbsp;functions&nbsp;are&nbsp;available&nbsp;to&nbsp;the&nbsp;client&nbsp;for&nbsp;32-bits&nbsp;&nbsp;<br>
versions&nbsp;of&nbsp;Delphi&nbsp;only:&nbsp; &nbsp;<br>
Actions&nbsp; &nbsp;<br>
CreateModuleEx &nbsp;<br>
New&nbsp;extended&nbsp;form&nbsp;of&nbsp;CreateModule.&nbsp;This&nbsp;will&nbsp;return&nbsp;a&nbsp;TIModuleInterface.&nbsp;All&nbsp;&nbsp;<br>
CreateModes&nbsp;from&nbsp;CreateModule&nbsp;are&nbsp;supported&nbsp;with&nbsp;only&nbsp;the&nbsp;following&nbsp;&nbsp;<br>
differences:&nbsp; &nbsp;<br>
cmExisting:&nbsp;Will&nbsp;create&nbsp;an&nbsp;existing&nbsp;module&nbsp;from&nbsp;the&nbsp;given&nbsp;file&nbsp;system.&nbsp; 
&nbsp;<br>
AncestorClass:&nbsp;This&nbsp;must&nbsp;specify&nbsp;an&nbsp;existing&nbsp;base&nbsp;class&nbsp;in&nbsp;the&nbsp;project.&nbsp;(use&nbsp;&nbsp;<br>
the&nbsp;cmAddToProject&nbsp;flag&nbsp;to&nbsp;add&nbsp;a&nbsp;module&nbsp;to&nbsp;the&nbsp;project&nbsp;first).&nbsp; 
&nbsp;<br>
Informational&nbsp; &nbsp;<br>
&nbsp;<br>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -