📄 template.txt
字号:
given class.</font></p>
</blockquote>
<blockquote>
<p><font size="2"><b>CLASSNAME</b> – specifies the class
that contains the map</font></p>
<p><font size="2"><b>map name </b>– name of the map to
add the entry to.</font></p>
<p><font size="2"><b>map entry</b> – the type of entry</font></p>
<p><font size="2"><b>#of parameters</b> – number of
parameters in the entry.</font></p>
<p><font size="2"><b>parameter1, ...</b> – parameters to
the entry. Max of 5 parameters.</font></p>
<p><font size="2"><strong><u>Example.</u></strong></font></p>
<p><font size="2">AddToMap(CONTROLCLASS, "COM",
" COM_INTERFACE_ENTRY", "1",
"ISomeInterface")</font></p>
<p><font size="2">This will add the following line to the COM
map in the class specified by CONTROLCLASS.</font></p>
<p><font size="2">COM_INTERFACE_ENTRY(ISomeInterface)</font></p>
</blockquote>
<p><font size="2"><b>AddClassInclude([CLASSNAME |
"classname"], [INCLUDENAME | "includename"],
"[h | cpp]")</b></font></p>
<blockquote>
<p><font size="2">Add the include directive to the header or
the implementation file associated with a specified class.</font></p>
<p><font size="2"><b>CLASSNAME or classname </b>– the
class used to determine the file to put the directive in.
This can be a symbol or a value.</font></p>
<p><font size="2"><b>INCLUDENAME or includename</b> –
specified what to include</font></p>
<p><font size="2"><b>h or cpp</b> – specifies where to
put the directive. h specifies the header file for the class.
cpp specifies implementation file for the class.</font></p>
</blockquote>
<p><font size="2"><b>AddMemberFunction([CLASSNAME |
"classname"], "function name", "return
type", "parameters", "access",
TEMPLATEFILE, "classwizfunc")</b></font></p>
<blockquote>
<p><font size="2">Adds the specified member function to the
class.</font></p>
<p><font size="2"><b>CLASSNAME or classname</b> – the
class the function has to be added to.</font></p>
<p><font size="2"><b>function name</b> – name of the
function to add</font></p>
<p><font size="2"><b>return type</b> – return type of
the function</font></p>
<p><font size="2"><b>parameters</b> – parameters to the
function</font></p>
<p><font size="2"><b>access</b> – can be one of the
following.</font></p>
<p><font size="2">ACCESS_PUBLIC – adds the function as a
public member function.</font></p>
<p><font size="2">ACCESS_PROTECTED – adds the function
as a protected member function.</font></p>
<p><font size="2">ACCESS_PRIVATE – adds the function as
a private member function.</font></p>
<p><font size="2"><b>TEMPLATEFILE</b> – specifies the
template file that contains the body of the function.</font></p>
<p><font size="2"><b>classwizfunc</b> – indicates if the
function declaration should be between classwizard comments. </font></p>
<blockquote>
<p><font size="2">If this is "0" then it is not
a function that should be added between classwizard
comments.<br>
If it is "1" the it is added between the
classwizard comments that pertain to virtual <b>functions.<br>
</b>Any other value add it between the comments
associated with class wizard message handler comments.</font></p>
</blockquote>
</blockquote>
<p><font size="2"><b>AddMemberVariable([CLASSNAME |
"classname"], "variable name", "variable
type", "access", "unique variable"[,
UNIQUEVARSYMBOL])</b></font></p>
<blockquote>
<p><font size="2">Adds the specified member variable to the
class.</font></p>
<p><font size="2"><b>CLASSNAME</b> or classname – the
class the variable has to be added to.</font></p>
<p><font size="2"><b>variable name</b> – name of the
variable to add</font></p>
<p><font size="2"><b>variable type</b> –type of variable</font></p>
<p><font size="2"><b>access</b> – can be one of the
following.</font></p>
<blockquote>
<p><font size="2">ACCESS_PUBLIC – adds the function
as a public member variable.</font></p>
<p><font size="2">ACCESS_PROTECTED – adds the
function as a protected member variable</font></p>
<p><font size="2">ACCESS_PRIVATE – adds the function
as a private member variable.</font></p>
</blockquote>
<p><font size="2"><b>unique variable</b> – indicates
whether the variable has to be an unique symbol.</font></p>
<blockquote>
<p><font size="2">"1" indicates that the symbol
has to be unique. requires the next parameter.</font></p>
<p><font size="2">other values indicate that if a
variable is already present then do nothing. Does not
require the next parameter.</font></p>
</blockquote>
<p><font size="2"><b>UNIQUEVARSYMBOL</b> – If a unique
symbol first checks to see if the variable is already a
member of the class. If not it add the variable and sets this
symbol to value passed in. If the variable already exists
then the wizard adds numbers after the given variable name
till it finds a value that is unique and adds the variable to
the class. On return this symbol will contain the value that
was created and inserted into the class.</font></p>
</blockquote>
<p><font size="2"><b>AddToMemberFunction([CLASSNAME |
"classname"], function, TEMPLATEFILE, SYMBOL,
SEARCHTYPE[, "search criteria"])</b></font></p>
<blockquote>
<p><font size="2">Adds code to a function depending onto
search. When a string search fails the code is added to the
end of the function.</font></p>
<p><font size="2"><b>CLASSNAME or classname</b> – the
class the function is a member of. Use NULL for global
functions.</font></p>
<p><font size="2"><b>function</b> – function to add code
to.</font></p>
<p><font size="2"><b>TEMPLATEFILE</b> – template file
that contains the code to be inserted.</font></p>
<p><font size="2"><b>SYMBOL</b> – this symbol is set to
1 before the template file is processed and then removed
after the processing is over. This allows a template file to
contain code for different purposes all of them wrapped in
different conditionals.</font></p>
<p><font size="2"><b>SEARCHTYPE</b> – can be one of the
following.</font></p>
<blockquote>
<p><font size="2">BEGIN – beginning of the function.
Does not require the next parameter.</font></p>
<p><font size="2">END – end of the function. Does
not require the next parameter.</font></p>
<p><font size="2">LINEOFFSET – a line offset from
the beginning of the function. Next parameter is a number
that gives the offset.</font></p>
</blockquote>
<p><font size="2"><b>AFTERSEARCH</b> – Inserts on the
line after the line that contains the search string. Next
parameter is the string to search for. Search begins at the
beginning of the function and the first match is used. If
search fails the string is added to the end of the function.</font></p>
<p><font size="2"><b>BEFORESEARCH</b> – Inserts on the
line before the line that contains the search string. Search
begins at the beginning of the function and the first match
is used. If search fails the string is added to the end of
the function.</font></p>
<p><font size="2"><b>search criteria</b> – depends on
the previous parameter.</font></p>
</blockquote>
<p><font size="2"><b>AddBaseClass(CLASSNAME, BASECLASS,
"access")</b></font></p>
<blockquote>
<p><font size="2">Adds a class as a base class to the
specified class.</font></p>
<p><font size="2"><b>CLASSNAME</b> – the class to which
the baseclass is to be added</font></p>
<p><font size="2"><b>BASECLASS</b> – the class to be
added as the base class</font></p>
<p><font size="2"><b>access</b> – This is ignored. The
class is added as public.</font></p>
</blockquote>
<p><font size="2"><b>ExistsMemberFunction([CLASSNAME |
"classname"], "function prototype", SYMBOL)</b></font></p>
<blockquote>
<p><font size="2">Checks if a function is a member of the
specified class.</font></p>
<p><font size="2"><b>CLASSNAME or classname</b> – The
class that should contain the member function. Use NULL for
global functions.</font></p>
<p><font size="2"><b>function prototype</b> – prototype
of the function to check</font></p>
<p><font size="2"><b>SYMBOL</b> – this symbol is set to
"1" if the function is a member otherwise it is set
to "0".</font></p>
</blockquote>
<p><font size="2"><strong>ExistsInMemberFunction([CLASSNAME |
"classname"], "function prototype",
"search string", SYMBOL)</strong></font></p>
<blockquote>
<p><font size="2">Checks if a function contains the specified
string.</font></p>
<p><font size="2"><b>CLASSNAME or classname </b>– the
class the function is a member of. Use NULL for global
functions.</font></p>
<p><font size="2"><b>function prototype</b> – prototype
of the function to search in.</font></p>
<p><font size="2"><b>search string</b> – string to
search for</font></p>
<p><font size="2"><b>SYMBOL</b> – this symbol is set to
"1" if the search succeeds otherwise it is set to
"0".</font></p>
</blockquote>
<p><font size="2"><b>IDLSettingsForATL()</b></font></p>
<blockquote>
<p><font size="2">Modifies the settings for an IDL/ODL
already in the project to match the settings required for
using ATL in the project.</font></p>
</blockquote>
<p><font size="2"><b>OpenDialog(DIALOGID)</b></font></p>
<blockquote>
<p><font size="2">Opens a dialog in the dialog editor after
the wizard exists.</font></p>
</blockquote>
<blockquote>
<p><font size="2"><b>DIALOGID</b> – the id of the dialog
to open.</font></p>
</blockquote>
<p><font size="2"><b>Commit()</b></font></p>
<blockquote>
<p><font size="2">Commits changes made by the wizard till
that point. Changes made before this directive will not
undone if the wizard fails after this directive. This
directive commits all the changes before it so the changes
can be accessed in the wizard. This is used by the Dialog
wizard to open the dialog resource. Any change made by the
wizard will not be accessible in the wizard till they are
committed by this directive.</font></p>
</blockquote>
<p><font size="4"><b><u>PropertyPages</u></b></font></p>
<p><font size="2">Property pages can be created to allow
customization of the object being inserted. The wizard creates a
property sheet using the OleCreatePropertyFrame API. The property
pages that are displayed using this property sheet should support
the IPropertyPage interface.</font></p>
<p><font size="2">Property pages can communicate with the wizard
using the ISymbolMap interface implemented by the wizard. </font></p>
<p><font size="3"><b>ISymbolMap</b></font></p>
<p><font size="2">In addition to the IUnknown methods it
implements the following.</font></p>
<p><font size="2"><b>HRESULT Set(/* [in] */ LPCOLESTR strSymbol,
/* [in] */ LPCOLESTR strValue);</b></font></p>
<blockquote>
<p><font size="2">Adds the symbol string pair to the internal
map of the wizard</font></p>
</blockquote>
<blockquote>
<p><font size="2">Returns S_OK</font></p>
</blockquote>
<p><font size="2"><b>HRESULT Get(/* [in] */ LPCOLESTR strSymbol,
/* [retval][out] */ BSTR *pstrValue);</b></font></p>
<blockquote>
<p><font size="2">Retrieves the value associated with the
specified symbol. If the call is successful pstrValue will
point to a BSTR which is allocated using SysAllocString. The
caller should free this string using SysFreeString</font></p>
<p><font size="2">Returns S_OK if it finds the symbol. E_FAIL
if the symbol is not found.</font></p>
</blockquote>
<p><font size="2"><b>HRESULT STDMETHODCALLTYPE Clear(void) ;</b></font></p>
<blockquote>
<p><font size="2">Clears all the internal map of the wizard
of all symbols.</font></p>
</blockquote>
<p><font size="2"><b>HRESULT SetStatus(const CLSID *pclsid, BOOL
bEnableOK);</b></font></p>
<blockquote>
<p><font size="2">Allows each individual property pages to
specify if the OK button can be enabled to allow the user to
complete their selections. This is useful when the OK button
has to be disabled till the user has entered some required
values.</font></p>
<p><font size="2"><strong>pcslid</strong> points to the CLSID
of the property page that is calling this method. </font></p>
<p><font size="2"><strong>bEnableOK</strong> specifies
whether the OK button should be enable or disabled. TRUE
specifies enable.</font></p>
</blockquote>
<p><font size="2">ISymbolMap can be obtained by Querying the
IUnknown passed through SetObjects method of IPropertyPage.</font></p>
<p><font size="4"><b><u>Existing Property Pages</u></b></font></p>
<p><font size="2">Following are some of the existing property
pages.</font></p>
<p><font size="2"><b><u>Names Property Page</u></b></font></p>
<p><font size="2">Sets the following symbols. ProgID is
"Names98". The symbol ComponentType controls
enabling/disabling controls. This is a string with each character
representing the field in the tab order. Each char should be
either 0 or 1.</font></p>
<p><font size="2"></font> </p>
<table border="1" cellpadding="9" width="100%"
bordercolor="#000000">
<tr>
<td valign="top" width="32%" bgcolor="#808080"><font
color="#FFFFFF" size="2"><b>Symbol</b></font></td>
<td valign="top" width="68%" bgcolor="#808080"><font
color="#FFFFFF" size="2"><b>Contents of field on the
Property Page that is used for value</b></font></td>
</tr>
<tr>
<td valign="top" width="32%"><font size="2">ShortName </font></td>
<td valign="top" width="68%"><font size="2">Short Name</font></td>
</tr>
<tr>
<td valign="top" width="32%"><font size="2">ClassName</font></td>
<td valign="top" width="68%"><font size="2">Class</font></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -