home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / common / msdev98 / template / atl / template.txt < prev    next >
Encoding:
Text File  |  1998-06-16  |  48.6 KB  |  1,377 lines

  1. <html>
  2.  
  3. <head>
  4. <meta http-equiv="Content-Type"
  5. content="text/html; charset=iso-8859-1">
  6. <meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
  7. <title>ATL Object Wizard</title>
  8. </head>
  9.  
  10. <body bgcolor="#FFFFFF">
  11.  
  12. <p><font size="2">All wizard directives are enclosed in
  13. [!…].</font></p>
  14.  
  15. <p><font size="2"><b>SYMBOLS</b> are denoted in uppercase.</font></p>
  16.  
  17. <p><font size="2">The wizard is case sensitive.</font></p>
  18.  
  19. <p><font size="2">The arguments to the wizard directives should
  20. be between ( ).</font></p>
  21.  
  22. <p><font size="4"><b><u>Wizard Directives.</u></b></font></p>
  23.  
  24. <p><font size="2"><b>SYMBOL</b></font></p>
  25.  
  26. <blockquote>
  27.     <p><font size="2">Replaces the symbol with the value of the
  28.     symbol.</font></p>
  29. </blockquote>
  30.  
  31. <p><font size="2"><b>if(SYMBOL)</b></font></p>
  32.  
  33. <blockquote>
  34.     <p><font size="2">Wizard ignores whatever is after this
  35.     statement till it finds an <b>else</b> or <b>endif</b>
  36.     directive if it does not find the symbol in its map. It does
  37.     not care for the value of the symbol.</font></p>
  38. </blockquote>
  39.  
  40. <p><font size="2"><b>if!(SYMBOL)</b></font></p>
  41.  
  42. <blockquote>
  43.     <p><font size="2">Wizard ignores whatever is after this
  44.     statement till it finds an <b>else</b> or <b>endif</b>
  45.     directive if it finds the symbol in its map. It does not care
  46.     for the value of the symbol.</font></p>
  47. </blockquote>
  48.  
  49. <p><font size="2"><b>if=(SYMBOL, "</b><b><i>value"</i></b><b>)</b></font></p>
  50.  
  51. <blockquote>
  52.     <p><font size="2">Wizard performs the directives after this
  53.     statement till it finds an <b>else</b> or <b>endif</b>
  54.     directive only if the value of the symbol matches the string.</font></p>
  55. </blockquote>
  56.  
  57. <p><font size="2"><b>if!=(SYMBOL, "</b><b><i>value"</i></b><b>)</b></font></p>
  58.  
  59. <blockquote>
  60.     <p><font size="2">Wizard performs the directives after this
  61.     statement till it finds an <b>else</b> or <b>endif</b>
  62.     directive only if the value of the symbol does not match the
  63.     string.</font></p>
  64. </blockquote>
  65.  
  66. <p><font size="2"><b>endif</b></font></p>
  67.  
  68. <blockquote>
  69.     <p><font size="2">Indicates the end of the if directives.</font></p>
  70. </blockquote>
  71.  
  72. <p><font size="2"><b>else</b></font></p>
  73.  
  74. <blockquote>
  75.     <p><font size="2">Used with if directives to associate
  76.     directives when the condition fails.</font></p>
  77. </blockquote>
  78.  
  79. <p><font size="2"><b>crlf</b></font></p>
  80.  
  81. <blockquote>
  82.     <p><font size="2">Inserts a new line in the output file.</font></p>
  83. </blockquote>
  84.  
  85. <p><font size="2"><b>outputoff</b></font></p>
  86.  
  87. <blockquote>
  88.     <p><font size="2">Turns off the output of the processed file.</font></p>
  89. </blockquote>
  90.  
  91. <p><font size="2"><b>outputon</b></font></p>
  92.  
  93. <blockquote>
  94.     <p><font size="2">Turns on the output of the processed file.</font></p>
  95. </blockquote>
  96.  
  97. <p><font size="2"><b>set(SYMBOL, "</b><b><i>value"</i></b><b>)</b></font></p>
  98.  
  99. <blockquote>
  100.     <p><font size="2">Sets the value of the symbol in the map of
  101.     symbols. If the symbol is not in the map then it is added to
  102.     the map.</font></p>
  103. </blockquote>
  104.  
  105. <p><font size="2"><b>RemoveSymbol (SYMBOL)</b></font></p>
  106.  
  107. <blockquote>
  108.     <p><font size="2">Removes the symbol from the internal map.</font></p>
  109. </blockquote>
  110.  
  111. <p><font size="2"><b>include(FILENAME)</b></font></p>
  112.  
  113. <blockquote>
  114.     <p><font size="2">Parses the contents of the specified file
  115.     and add the parsed contents to the outputfile. It should be
  116.     included after a target directive.</font></p>
  117. </blockquote>
  118.  
  119. <p><font size="2"><b>target() or target(FILENAME)</b></font></p>
  120.  
  121. <blockquote>
  122.     <p><font size="2">Specifies that further output should be
  123.     sent to the specified file if one is suggested. Use the
  124.     include directive to add contents of a template file in to
  125.     the output file after processing it.</font></p>
  126. </blockquote>
  127.  
  128. <blockquote>
  129.     <p><font size="2">When specified without a filename it closes
  130.     the current outputfile.</font></p>
  131.     <p><font size="2">Before processing the file this Sets a
  132.     symbol FileExists to "TRUE" or "FALSE"
  133.     depending on whether the target file already exists.</font></p>
  134.     <p><font size="2">Example :</font></p>
  135.     <p><font size="2">target(CPPFILE)</font></p>
  136.     <p><font size="2">include(CPPTEMPLATE)</font></p>
  137.     <p><font size="2">target()</font></p>
  138.     <p><font size="2">The above directives assume that CPPFILE
  139.     and CPPTEMPLATE symbols point to valid filenames. The first
  140.     directive target(CPPFILE) specifies that further output
  141.     should be sent to the specified file. The
  142.     include(CPPTEMPLATE) directive specifies that the template
  143.     file specified by CPPTEMPLATE should be processed by the
  144.     wizard and the processed contents sent to the current output
  145.     file. The last directive target() specifies that the current
  146.     output file should be closed. At this point there is not
  147.     current output file.</font></p>
  148. </blockquote>
  149.  
  150. <p><font size="2"><b>newguid(SYMBOL)</b></font></p>
  151.  
  152. <blockquote>
  153.     <p><font size="2">Directive creates a new guid and puts its
  154.     value into the specified SYMBOL</font></p>
  155. </blockquote>
  156.  
  157. <p><font size="2"><b>CopyFile(EXISTINGFILENAME, NEWFILENAME)</b></font></p>
  158.  
  159. <blockquote>
  160.     <p><font size="2">Copies existing file to a new file</font></p>
  161. </blockquote>
  162.  
  163. <p><font size="2"><b>DeleteFile(FILENAME)</b></font></p>
  164.  
  165. <blockquote>
  166.     <p><font size="2">Deletes the file</font></p>
  167. </blockquote>
  168.  
  169. <p><font size="2"><b>GetTemporaryFileName(SYMBOL)</b></font></p>
  170.  
  171. <blockquote>
  172.     <p><font size="2">Uses system calls to create a temporary
  173.     filename and sets the symbol to the value.</font></p>
  174. </blockquote>
  175.  
  176. <p><font size="2"><b>DoubleSlash(SYMBOL)</b></font></p>
  177.  
  178. <blockquote>
  179.     <p><font size="2">Adds a \ after an existing \ to the value
  180.     of the symbol. This will be useful when adding headers files
  181.     with a path in them.</font></p>
  182. </blockquote>
  183.  
  184. <blockquote>
  185.     <p><font size="2">Example</font></p>
  186.     <p><font size="2">INCLUDEFILESTRING has value of
  187.     "..\include\headerfile.h"</font></p>
  188.     <p><font size="2">After the following directive is executed </font></p>
  189.     <p><font size="2">DoubleSlash(INCLUDEFILESTRING)</font></p>
  190.     <p><font size="2">INCLUDEFILESTRING will be
  191.     "..\\include\\headerfile.h"</font></p>
  192. </blockquote>
  193.  
  194. <p><font size="2"><b>AddInterfaceToIDL(IDLFILENAME, FILENAME)</b></font></p>
  195.  
  196. <blockquote>
  197.     <p><font size="2">Processes the contents of the specified
  198.     file and adds it to the IDL file assuming that the contents
  199.     in the specified file is information about an Interface.</font></p>
  200. </blockquote>
  201.  
  202. <p><font size="2"><b>AddCoClassToIDL(IDLFILENAME, FILENAME)</b></font></p>
  203.  
  204. <blockquote>
  205.     <p><font size="2">Processes the contents of the specified
  206.     file and adds it to the IDL file assuming that the contents
  207.     in the specified file is information about a CoClass.</font></p>
  208. </blockquote>
  209.  
  210. <p><font size="2"><b>AddToObjectMap(COCLASSNAME, CLASSNAME)</b></font></p>
  211.  
  212. <blockquote>
  213.     <p><font size="2">Adds a directive to the ObjectMap of
  214.     project associating the CoClass with the class.</font></p>
  215. </blockquote>
  216.  
  217. <p><font size="2"><b>AddIncludeFile(FILENAME, INCLUDEDIRECTIVE)</b></font></p>
  218.  
  219. <blockquote>
  220.     <p><font size="2">Adds the #include preprocessor directive to
  221.     the specified file. INCLUDEDIRECTIVE specifies what follows
  222.     #include. The is added after any existing #include directives
  223.     in the file.</font></p>
  224. </blockquote>
  225.  
  226. <p><font size="2"><b>AddImportFile(IDLFILENAME, "</b><b><i>value"</i></b><b>)</b></font></p>
  227.  
  228. <blockquote>
  229.     <p><font size="2">Adds the import statement line to the
  230.     specified IDL file. Value specifies what to import. This is
  231.     added after any existing import statements in the IDL file</font></p>
  232. </blockquote>
  233.  
  234. <p><font size="2"><b>AddSymbolToString(NEWSYMBOL, "</b><b><i>value"</i></b><b>,
  235. SYMBOL)</b></font></p>
  236.  
  237. <blockquote>
  238.     <p><font size="2">Appends the string specified by the symbol
  239.     to the value and associates the resulting value with the
  240.     newsymbol.</font></p>
  241. </blockquote>
  242.  
  243. <p><font size="2"><b>AddStringToSymbol(NEWSYMBOL, SYMBOL, "</b><b><i>value"</i></b><b>)</b></font></p>
  244.  
  245. <blockquote>
  246.     <p><font size="2">Appends the value of the symbol specified
  247.     by the second argument to the contents of the string value
  248.     and associates the resulting value with the symbol specified
  249.     as the first argument.</font></p>
  250. </blockquote>
  251.  
  252. <p><font size="2"><b>AddSymbolToSymbol(SYMBOL1, SYMBOL2)</b></font></p>
  253.  
  254. <blockquote>
  255.     <p><font size="2">Appends the value of SYMBOL2 to the value
  256.     of SYMBOL1 and associates the resulting string with SYMBOL1</font></p>
  257. </blockquote>
  258.  
  259. <p><font size="2"><b>Dialog("</b><b><i>dialog1_progid"</i></b><b>[,"</b><b><i>dialog2_progid"</i></b><b>[,…])</b></font></p>
  260.  
  261. <blockquote>
  262.     <p><font size="2">Directive allows the user to invoke the
  263.     property pages to allow the user to specify the settings for
  264.     the object being inserted. Specify the ProgID of the
  265.     registered property pages. Please refer to the section on
  266.     property pages for information about registering property
  267.     pages and communicating with the wizard from the property
  268.     page.</font></p>
  269. </blockquote>
  270.  
  271. <blockquote>
  272.     <p><font size="2">You can specify a maximum of 9 pages.</font></p>
  273. </blockquote>
  274.  
  275. <p><font size="2"><b>AddFileToProject(FILENAME)</b></font></p>
  276.  
  277. <blockquote>
  278.     <p><font size="2">Adds the file to the project with the
  279.     default build settings.</font></p>
  280. </blockquote>
  281.  
  282. <p><font size="2"><b>strcpy(SYMBOL1, SYMBOL2)</b></font></p>
  283.  
  284. <blockquote>
  285.     <p><font size="2">Copies the value of symbol2 to the symbol1</font></p>
  286. </blockquote>
  287.  
  288. <p><font size="2"><b>toupper(SYMBOL)</b></font></p>
  289.  
  290. <blockquote>
  291.     <p><font size="2">converts the value of the symbol to upper
  292.     case</font></p>
  293. </blockquote>
  294.  
  295. <p><font size="2"><b>tolower(SYMBOL)</b></font></p>
  296.  
  297. <blockquote>
  298.     <p><font size="2">Converts the value of symbol to lower case</font></p>
  299. </blockquote>
  300.  
  301. <p><font size="2"><b>AddRegistryToRC(RGSFILENAME, ID_RGS)</b></font></p>
  302.  
  303. <blockquote>
  304.     <p><font size="2">Adds the specified RGS file into the
  305.     resources as type REGISTRY with the specified ID.</font></p>
  306. </blockquote>
  307.  
  308. <p><font size="2"><b>AddStringResource(ID_OF_STRING, SYMBOL)</b></font></p>
  309.  
  310. <blockquote>
  311.     <p><font size="2">Adds a string resource with the specified
  312.     ID to the RC file. The values of the string will be the value
  313.     of the symbol.</font></p>
  314. </blockquote>
  315.  
  316. <p><font size="2"><b>AddResourceFromFile(FILE, ID_RESOURCE,
  317. RESOURCETYPE)</b></font></p>
  318.  
  319. <blockquote>
  320.     <p><font size="2">Adds the contents of the specified file to
  321.     the RC file under the correct resource type with the
  322.     specified ID</font></p>
  323. </blockquote>
  324.  
  325. <p><font size="2"><b>Debug ()</b></font></p>
  326.  
  327. <blockquote>
  328.     <p><font size="2">If this directive is added to the .CTL file
  329.     the wizard displays the directive that failed in case of a
  330.     failure.</font></p>
  331. </blockquote>
  332.  
  333. <p><font size="2"><b>Error ("error message")</b></font></p>
  334.  
  335. <blockquote>
  336.     <p><font size="2">Use this directive to terminate the wizard.
  337.     It displays the error message before terminating.</font></p>
  338. </blockquote>
  339.  
  340. <p><font size="2"><b>AddToMap(CLASSNAME, "map",
  341. "map entry", "#of parameters" [,
  342. "parameter1" [,...]])</b></font></p>
  343.  
  344. <blockquote>
  345.     <p><font size="2">Adds an entry to the specified map in the
  346.     given class.</font></p>
  347. </blockquote>
  348.  
  349. <blockquote>
  350.     <p><font size="2"><b>CLASSNAME</b> – specifies the class
  351.     that contains the map</font></p>
  352.     <p><font size="2"><b>map name </b>– name of the map to
  353.     add the entry to.</font></p>
  354.     <p><font size="2"><b>map entry</b> – the type of entry</font></p>
  355.     <p><font size="2"><b>#of parameters</b> – number of
  356.     parameters in the entry.</font></p>
  357.     <p><font size="2"><b>parameter1, ...</b> – parameters to
  358.     the entry. Max of 5 parameters.</font></p>
  359.     <p><font size="2"><strong><u>Example.</u></strong></font></p>
  360.     <p><font size="2">AddToMap(CONTROLCLASS, "COM",
  361.     " COM_INTERFACE_ENTRY", "1",
  362.     "ISomeInterface")</font></p>
  363.     <p><font size="2">This will add the following line to the COM
  364.     map in the class specified by CONTROLCLASS.</font></p>
  365.     <p><font size="2">COM_INTERFACE_ENTRY(ISomeInterface)</font></p>
  366. </blockquote>
  367.  
  368. <p><font size="2"><b>AddClassInclude([CLASSNAME |
  369. "classname"], [INCLUDENAME | "includename"],
  370. "[h | cpp]")</b></font></p>
  371.  
  372. <blockquote>
  373.     <p><font size="2">Add the include directive to the header or
  374.     the implementation file associated with a specified class.</font></p>
  375.     <p><font size="2"><b>CLASSNAME or classname </b>– the
  376.     class used to determine the file to put the directive in.
  377.     This can be a symbol or a value.</font></p>
  378.     <p><font size="2"><b>INCLUDENAME or includename</b> –
  379.     specified what to include</font></p>
  380.     <p><font size="2"><b>h or cpp</b> – specifies where to
  381.     put the directive. h specifies the header file for the class.
  382.     cpp specifies implementation file for the class.</font></p>
  383. </blockquote>
  384.  
  385. <p><font size="2"><b>AddMemberFunction([CLASSNAME |
  386. "classname"], "function name", "return
  387. type", "parameters", "access",
  388. TEMPLATEFILE, "classwizfunc")</b></font></p>
  389.  
  390. <blockquote>
  391.     <p><font size="2">Adds the specified member function to the
  392.     class.</font></p>
  393.     <p><font size="2"><b>CLASSNAME or classname</b> – the
  394.     class the function has to be added to.</font></p>
  395.     <p><font size="2"><b>function name</b> – name of the
  396.     function to add</font></p>
  397.     <p><font size="2"><b>return type</b> – return type of
  398.     the function</font></p>
  399.     <p><font size="2"><b>parameters</b> – parameters to the
  400.     function</font></p>
  401.     <p><font size="2"><b>access</b> – can be one of the
  402.     following.</font></p>
  403.     <p><font size="2">ACCESS_PUBLIC – adds the function as a
  404.     public member function.</font></p>
  405.     <p><font size="2">ACCESS_PROTECTED – adds the function
  406.     as a protected member function.</font></p>
  407.     <p><font size="2">ACCESS_PRIVATE – adds the function as
  408.     a private member function.</font></p>
  409.     <p><font size="2"><b>TEMPLATEFILE</b> – specifies the
  410.     template file that contains the body of the function.</font></p>
  411.     <p><font size="2"><b>classwizfunc</b> – indicates if the
  412.     function declaration should be between classwizard comments. </font></p>
  413.     <blockquote>
  414.         <p><font size="2">If this is "0" then it is not
  415.         a function that should be added between classwizard
  416.         comments.<br>
  417.         If it is "1" the it is added between the
  418.         classwizard comments that pertain to virtual <b>functions.<br>
  419.         </b>Any other value add it between the comments
  420.         associated with class wizard message handler comments.</font></p>
  421.     </blockquote>
  422. </blockquote>
  423.  
  424. <p><font size="2"><b>AddMemberVariable([CLASSNAME |
  425. "classname"], "variable name", "variable
  426. type", "access", "unique variable"[,
  427. UNIQUEVARSYMBOL])</b></font></p>
  428.  
  429. <blockquote>
  430.     <p><font size="2">Adds the specified member variable to the
  431.     class.</font></p>
  432.     <p><font size="2"><b>CLASSNAME</b> or classname – the
  433.     class the variable has to be added to.</font></p>
  434.     <p><font size="2"><b>variable name</b> – name of the
  435.     variable to add</font></p>
  436.     <p><font size="2"><b>variable type</b> –type of variable</font></p>
  437.     <p><font size="2"><b>access</b> – can be one of the
  438.     following.</font></p>
  439.     <blockquote>
  440.         <p><font size="2">ACCESS_PUBLIC – adds the function
  441.         as a public member variable.</font></p>
  442.         <p><font size="2">ACCESS_PROTECTED – adds the
  443.         function as a protected member variable</font></p>
  444.         <p><font size="2">ACCESS_PRIVATE – adds the function
  445.         as a private member variable.</font></p>
  446.     </blockquote>
  447.     <p><font size="2"><b>unique variable</b> – indicates
  448.     whether the variable has to be an unique symbol.</font></p>
  449.     <blockquote>
  450.         <p><font size="2">"1" indicates that the symbol
  451.         has to be unique. requires the next parameter.</font></p>
  452.         <p><font size="2">other values indicate that if a
  453.         variable is already present then do nothing. Does not
  454.         require the next parameter.</font></p>
  455.     </blockquote>
  456.     <p><font size="2"><b>UNIQUEVARSYMBOL</b> – If a unique
  457.     symbol first checks to see if the variable is already a
  458.     member of the class. If not it add the variable and sets this
  459.     symbol to value passed in. If the variable already exists
  460.     then the wizard adds numbers after the given variable name
  461.     till it finds a value that is unique and adds the variable to
  462.     the class. On return this symbol will contain the value that
  463.     was created and inserted into the class.</font></p>
  464. </blockquote>
  465.  
  466. <p><font size="2"><b>AddToMemberFunction([CLASSNAME |
  467. "classname"], function, TEMPLATEFILE, SYMBOL,
  468. SEARCHTYPE[, "search criteria"])</b></font></p>
  469.  
  470. <blockquote>
  471.     <p><font size="2">Adds code to a function depending onto
  472.     search. When a string search fails the code is added to the
  473.     end of the function.</font></p>
  474.     <p><font size="2"><b>CLASSNAME or classname</b> – the
  475.     class the function is a member of. Use NULL for global
  476.     functions.</font></p>
  477.     <p><font size="2"><b>function</b> – function to add code
  478.     to.</font></p>
  479.     <p><font size="2"><b>TEMPLATEFILE</b> – template file
  480.     that contains the code to be inserted.</font></p>
  481.     <p><font size="2"><b>SYMBOL</b> – this symbol is set to
  482.     1 before the template file is processed and then removed
  483.     after the processing is over. This allows a template file to
  484.     contain code for different purposes all of them wrapped in
  485.     different conditionals.</font></p>
  486.     <p><font size="2"><b>SEARCHTYPE</b> – can be one of the
  487.     following.</font></p>
  488.     <blockquote>
  489.         <p><font size="2">BEGIN – beginning of the function.
  490.         Does not require the next parameter.</font></p>
  491.         <p><font size="2">END – end of the function. Does
  492.         not require the next parameter.</font></p>
  493.         <p><font size="2">LINEOFFSET – a line offset from
  494.         the beginning of the function. Next parameter is a number
  495.         that gives the offset.</font></p>
  496.     </blockquote>
  497.     <p><font size="2"><b>AFTERSEARCH</b> – Inserts on the
  498.     line after the line that contains the search string. Next
  499.     parameter is the string to search for. Search begins at the
  500.     beginning of the function and the first match is used. If
  501.     search fails the string is added to the end of the function.</font></p>
  502.     <p><font size="2"><b>BEFORESEARCH</b> – Inserts on the
  503.     line before the line that contains the search string. Search
  504.     begins at the beginning of the function and the first match
  505.     is used. If search fails the string is added to the end of
  506.     the function.</font></p>
  507.     <p><font size="2"><b>search criteria</b> – depends on
  508.     the previous parameter.</font></p>
  509. </blockquote>
  510.  
  511. <p><font size="2"><b>AddBaseClass(CLASSNAME, BASECLASS,
  512. "access")</b></font></p>
  513.  
  514. <blockquote>
  515.     <p><font size="2">Adds a class as a base class to the
  516.     specified class.</font></p>
  517.     <p><font size="2"><b>CLASSNAME</b> – the class to which
  518.     the baseclass is to be added</font></p>
  519.     <p><font size="2"><b>BASECLASS</b> – the class to be
  520.     added as the base class</font></p>
  521.     <p><font size="2"><b>access</b> – This is ignored. The
  522.     class is added as public.</font></p>
  523. </blockquote>
  524.  
  525. <p><font size="2"><b>ExistsMemberFunction([CLASSNAME |
  526. "classname"], "function prototype", SYMBOL)</b></font></p>
  527.  
  528. <blockquote>
  529.     <p><font size="2">Checks if a function is a member of the
  530.     specified class.</font></p>
  531.     <p><font size="2"><b>CLASSNAME or classname</b> – The
  532.     class that should contain the member function. Use NULL for
  533.     global functions.</font></p>
  534.     <p><font size="2"><b>function prototype</b> – prototype
  535.     of the function to check</font></p>
  536.     <p><font size="2"><b>SYMBOL</b> – this symbol is set to
  537.     "1" if the function is a member otherwise it is set
  538.     to "0".</font></p>
  539. </blockquote>
  540.  
  541. <p><font size="2"><strong>ExistsInMemberFunction([CLASSNAME |
  542. "classname"], "function prototype",
  543. "search string", SYMBOL)</strong></font></p>
  544.  
  545. <blockquote>
  546.     <p><font size="2">Checks if a function contains the specified
  547.     string.</font></p>
  548.     <p><font size="2"><b>CLASSNAME or classname </b>– the
  549.     class the function is a member of. Use NULL for global
  550.     functions.</font></p>
  551.     <p><font size="2"><b>function prototype</b> – prototype
  552.     of the function to search in.</font></p>
  553.     <p><font size="2"><b>search string</b> – string to
  554.     search for</font></p>
  555.     <p><font size="2"><b>SYMBOL</b> – this symbol is set to
  556.     "1" if the search succeeds otherwise it is set to
  557.     "0".</font></p>
  558. </blockquote>
  559.  
  560. <p><font size="2"><b>IDLSettingsForATL()</b></font></p>
  561.  
  562. <blockquote>
  563.     <p><font size="2">Modifies the settings for an IDL/ODL
  564.     already in the project to match the settings required for
  565.     using ATL in the project.</font></p>
  566. </blockquote>
  567.  
  568. <p><font size="2"><b>OpenDialog(DIALOGID)</b></font></p>
  569.  
  570. <blockquote>
  571.     <p><font size="2">Opens a dialog in the dialog editor after
  572.     the wizard exists.</font></p>
  573. </blockquote>
  574.  
  575. <blockquote>
  576.     <p><font size="2"><b>DIALOGID</b> – the id of the dialog
  577.     to open.</font></p>
  578. </blockquote>
  579.  
  580. <p><font size="2"><b>Commit()</b></font></p>
  581.  
  582. <blockquote>
  583.     <p><font size="2">Commits changes made by the wizard till
  584.     that point. Changes made before this directive will not
  585.     undone if the wizard fails after this directive. This
  586.     directive commits all the changes before it so the changes
  587.     can be accessed in the wizard. This is used by the Dialog
  588.     wizard to open the dialog resource. Any change made by the
  589.     wizard will not be accessible in the wizard till they are
  590.     committed by this directive.</font></p>
  591. </blockquote>
  592.  
  593. <p><font size="4"><b><u>PropertyPages</u></b></font></p>
  594.  
  595. <p><font size="2">Property pages can be created to allow
  596. customization of the object being inserted. The wizard creates a
  597. property sheet using the OleCreatePropertyFrame API. The property
  598. pages that are displayed using this property sheet should support
  599. the IPropertyPage interface.</font></p>
  600.  
  601. <p><font size="2">Property pages can communicate with the wizard
  602. using the ISymbolMap interface implemented by the wizard. </font></p>
  603.  
  604. <p><font size="3"><b>ISymbolMap</b></font></p>
  605.  
  606. <p><font size="2">In addition to the IUnknown methods it
  607. implements the following.</font></p>
  608.  
  609. <p><font size="2"><b>HRESULT Set(/* [in] */ LPCOLESTR strSymbol,
  610. /* [in] */ LPCOLESTR strValue);</b></font></p>
  611.  
  612. <blockquote>
  613.     <p><font size="2">Adds the symbol string pair to the internal
  614.     map of the wizard</font></p>
  615. </blockquote>
  616.  
  617. <blockquote>
  618.     <p><font size="2">Returns S_OK</font></p>
  619. </blockquote>
  620.  
  621. <p><font size="2"><b>HRESULT Get(/* [in] */ LPCOLESTR strSymbol,
  622. /* [retval][out] */ BSTR *pstrValue);</b></font></p>
  623.  
  624. <blockquote>
  625.     <p><font size="2">Retrieves the value associated with the
  626.     specified symbol. If the call is successful pstrValue will
  627.     point to a BSTR which is allocated using SysAllocString. The
  628.     caller should free this string using SysFreeString</font></p>
  629.     <p><font size="2">Returns S_OK if it finds the symbol. E_FAIL
  630.     if the symbol is not found.</font></p>
  631. </blockquote>
  632.  
  633. <p><font size="2"><b>HRESULT STDMETHODCALLTYPE Clear(void) ;</b></font></p>
  634.  
  635. <blockquote>
  636.     <p><font size="2">Clears all the internal map of the wizard
  637.     of all symbols.</font></p>
  638. </blockquote>
  639.  
  640. <p><font size="2"><b>HRESULT SetStatus(const CLSID *pclsid, BOOL
  641. bEnableOK);</b></font></p>
  642.  
  643. <blockquote>
  644.     <p><font size="2">Allows each individual property pages to
  645.     specify if the OK button can be enabled to allow the user to
  646.     complete their selections. This is useful when the OK button
  647.     has to be disabled till the user has entered some required
  648.     values.</font></p>
  649.     <p><font size="2"><strong>pcslid</strong> points to the CLSID
  650.     of the property page that is calling this method. </font></p>
  651.     <p><font size="2"><strong>bEnableOK</strong> specifies
  652.     whether the OK button should be enable or disabled. TRUE
  653.     specifies enable.</font></p>
  654. </blockquote>
  655.  
  656. <p><font size="2">ISymbolMap can be obtained by Querying the
  657. IUnknown passed through SetObjects method of IPropertyPage.</font></p>
  658.  
  659. <p><font size="4"><b><u>Existing Property Pages</u></b></font></p>
  660.  
  661. <p><font size="2">Following are some of the existing property
  662. pages.</font></p>
  663.  
  664. <p><font size="2"><b><u>Names Property Page</u></b></font></p>
  665.  
  666. <p><font size="2">Sets the following symbols. ProgID is
  667. "Names98". The symbol ComponentType controls
  668. enabling/disabling controls. This is a string with each character
  669. representing the field in the tab order. Each char should be
  670. either 0 or 1.</font></p>
  671.  
  672. <p><font size="2"></font> </p>
  673.  
  674. <table border="1" cellpadding="9" width="100%"
  675. bordercolor="#000000">
  676.     <tr>
  677.         <td valign="top" width="32%" bgcolor="#808080"><font
  678.         color="#FFFFFF" size="2"><b>Symbol</b></font></td>
  679.         <td valign="top" width="68%" bgcolor="#808080"><font
  680.         color="#FFFFFF" size="2"><b>Contents of field on the
  681.         Property Page that is used for value</b></font></td>
  682.     </tr>
  683.     <tr>
  684.         <td valign="top" width="32%"><font size="2">ShortName </font></td>
  685.         <td valign="top" width="68%"><font size="2">Short Name</font></td>
  686.     </tr>
  687.     <tr>
  688.         <td valign="top" width="32%"><font size="2">ClassName</font></td>
  689.         <td valign="top" width="68%"><font size="2">Class</font></td>
  690.     </tr>
  691.     <tr>
  692.         <td valign="top" width="32%"><font size="2">HeaderName</font></td>
  693.         <td valign="top" width="68%"><font size="2">.H File</font></td>
  694.     </tr>
  695.     <tr>
  696.         <td valign="top" width="32%"><font size="2">CPPName</font></td>
  697.         <td valign="top" width="68%"><font size="2">.CPP File</font></td>
  698.     </tr>
  699.     <tr>
  700.         <td valign="top" width="32%"><font size="2">CoClassName</font></td>
  701.         <td valign="top" width="68%"><font size="2">CoClass</font></td>
  702.     </tr>
  703.     <tr>
  704.         <td valign="top" width="32%"><font size="2">InterfaceName</font></td>
  705.         <td valign="top" width="68%"><font size="2">Interface</font></td>
  706.     </tr>
  707.     <tr>
  708.         <td valign="top" width="32%"><font size="2">TypeName</font></td>
  709.         <td valign="top" width="68%"><font size="2">Type</font></td>
  710.     </tr>
  711.     <tr>
  712.         <td valign="top" width="32%"><font size="2">ProgID</font></td>
  713.         <td valign="top" width="68%"><font size="2">ProgID with a
  714.         .1 appended</font></td>
  715.     </tr>
  716.     <tr>
  717.         <td valign="top" width="32%"><font size="2">VersionIndependentProgID</font></td>
  718.         <td valign="top" width="68%"><font size="2">ProgId</font></td>
  719.     </tr>
  720.     <tr>
  721.         <td valign="top" width="32%"><font size="2">ObjectGUID</font></td>
  722.         <td valign="top" width="68%"><font size="2">None. A new
  723.         GUID is generated and its value is used.</font></td>
  724.     </tr>
  725. </table>
  726.  
  727. <p><font size="2"><b><u>Miscellaneous Property Page</u></b></font></p>
  728.  
  729. <p><font size="2">Sets the following Symbols. ProgID is
  730. "CtlDlg98"</font></p>
  731.  
  732. <table border="1" cellpadding="9" width="100%"
  733. bordercolor="#000000">
  734.     <tr>
  735.         <td valign="top" width="32%" bgcolor="#808080"><font
  736.         color="#FFFFFF" size="2"><b>Symbol</b></font></td>
  737.         <td valign="top" width="68%" bgcolor="#808080"><font
  738.         color="#FFFFFF" size="2"><b>Contents of field on the
  739.         Property Page that is used for value</b></font></td>
  740.     </tr>
  741.     <tr>
  742.         <td valign="top" width="32%"><font size="2">WindowedOnlyEnabled</font></td>
  743.         <td valign="top" width="68%"><font size="2">Windowed
  744.         (TRUE or FALSE)</font></td>
  745.     </tr>
  746.     <tr>
  747.         <td valign="top" width="32%"><font size="2">InsertableEnabled</font></td>
  748.         <td valign="top" width="68%"><font size="2">Insertable
  749.         (TRUE or FALSE)</font></td>
  750.     </tr>
  751.     <tr>
  752.         <td valign="top" width="32%"><font size="2">NormalizeDCEnabled</font></td>
  753.         <td valign="top" width="68%"><font size="2">Normalize DC
  754.         (TRUE or FALSE)</font></td>
  755.     </tr>
  756.     <tr>
  757.         <td valign="top" width="32%"><font size="2">Opaque</font></td>
  758.         <td valign="top" width="68%"><font size="2">Opaque (TRUE
  759.         or FALSE)</font></td>
  760.     </tr>
  761.     <tr>
  762.         <td valign="top" width="32%"><font size="2">SolidBackground</font></td>
  763.         <td valign="top" width="68%"><font size="2">SolidBackground
  764.         (TRUE or FALSE)</font></td>
  765.     </tr>
  766.     <tr>
  767.         <td valign="top" width="32%"><font size="2">MiscStatus</font></td>
  768.         <td valign="top" width="68%"><font size="2">Misc setting
  769.         fields</font></td>
  770.     </tr>
  771.     <tr>
  772.         <td valign="top" width="32%"><font size="2">SubclassWindow</font></td>
  773.         <td valign="top" width="68%"><font size="2">Subclass
  774.         Combobox selection</font></td>
  775.     </tr>
  776.     <tr>
  777.         <td valign="top" width="32%"><font size="2">SubclassWindowSymbol</font></td>
  778.         <td valign="top" width="68%"><font size="2">Subclass
  779.         Combobox selection without those characters that cannot
  780.         be used in an identifier.</font></td>
  781.     </tr>
  782. </table>
  783.  
  784. <p><font size="2"><b><u>Attributes Property Page</u></b></font></p>
  785.  
  786. <p><font size="2">Sets the following Symbols. ProgID is
  787. "ObjDlg98"</font></p>
  788.  
  789. <p><font size="2">The symbol Attributes controls
  790. enabling/disabling controls. This is a string with each character
  791. representing the field in the tab order. Each char should be
  792. either 0 or 1.</font></p>
  793.  
  794. <table border="1" cellpadding="9" width="100%"
  795. bordercolor="#000000">
  796.     <tr>
  797.         <td valign="top" width="32%" bgcolor="#808080"><font
  798.         color="#FFFFFF" size="2"><b>Symbol</b></font></td>
  799.         <td valign="top" width="68%" bgcolor="#808080"><font
  800.         color="#FFFFFF" size="2"><b>Contents of field on the
  801.         Property Page that is used for value</b></font></td>
  802.     </tr>
  803.     <tr>
  804.         <td valign="top" width="32%"><font size="2">FreeThreadedMarshaler</font></td>
  805.         <td valign="top" width="68%"><font size="2">FreeThreadedMarshaler
  806.         (TRUE or FALSE)</font></td>
  807.     </tr>
  808.     <tr>
  809.         <td valign="top" width="32%"><font size="2">ErrorInfoEnabled</font></td>
  810.         <td valign="top" width="68%"><font size="2">ErrorInfo
  811.         (TRUE or FALSE)</font></td>
  812.     </tr>
  813.     <tr>
  814.         <td valign="top" width="32%"><font size="2">ConnectionPointsEnabled</font></td>
  815.         <td valign="top" width="68%"><font size="2">ConnectionPoints
  816.         (TRUE or FALSE)</font></td>
  817.     </tr>
  818.     <tr>
  819.         <td valign="top" width="32%"><font size="2">Dual</font></td>
  820.         <td valign="top" width="68%"><font size="2">Dual (TRUE or
  821.         FALSE)</font></td>
  822.     </tr>
  823.     <tr>
  824.         <td valign="top" width="32%"><font size="2">ThreadingModel</font></td>
  825.         <td valign="top" width="68%"><font size="2">ThreadingModel
  826.         (Single, Apartment, Both, Free)</font></td>
  827.     </tr>
  828.     <tr>
  829.         <td valign="top" width="32%"><font size="2">Aggregatable</font></td>
  830.         <td valign="top" width="68%"><font size="2">Aggregatable
  831.         (YES, NO, ONLY)</font></td>
  832.     </tr>
  833. </table>
  834.  
  835. <p><font size="4"><b><u>Registry entries.</u></b></font></p>
  836.  
  837. <p><font size="2">The following keys are added to the registry
  838. under the </font></p>
  839.  
  840. <p><font size="2">HKCU\Software\Microsoft\ATLWizard</font></p>
  841.  
  842. <p><font size="2">{GUID} </font></p>
  843.  
  844. <p><font size="2">Category – REG_SZ
  845. "<Category>"</font></p>
  846.  
  847. <p><font size="2">Control – REG_SZ "<File
  848. name>"</font></p>
  849.  
  850. <p><font size="2">Icon – REG_SZ "File Name>"</font></p>
  851.  
  852. <p><font size="2">Name – REG_SZ "<Name>"</font></p>
  853.  
  854. <p><font size="2">{GUID} – a GUID for your component. This
  855. is not associated with anything else. A GUID is used to get a
  856. unique name</font></p>
  857.  
  858. <p><font size="2">Category – specifies the category under
  859. which the component should appear. </font></p>
  860.  
  861. <p><font size="2">Control – name of the control file that
  862. has directives for the component. It is normally a .CTL file.</font></p>
  863.  
  864. <p><font size="2">Icon – Name of the file that contains the
  865. Icon for the component.</font></p>
  866.  
  867. <p><font size="2">Name – Name of the component.</font></p>
  868.  
  869. <p><font size="2">Register the property page. The wizard loads
  870. the property page using its ProgID specified in the directive
  871. file.</font></p>
  872.  
  873. <p><b><u>Symbols set by the Wizard before invoking the control
  874. file.</u></b></p>
  875.  
  876. <table border="1" cellpadding="9" width="100%"
  877. bordercolor="#000000">
  878.     <tr>
  879.         <td valign="top" width="29%" bgcolor="#808080"><font
  880.         color="#FFFFFF" size="2"><b>Symbol</b></font></td>
  881.         <td valign="top" width="71%" bgcolor="#808080"><font
  882.         color="#FFFFFF" size="2"><b>Value</b></font></td>
  883.     </tr>
  884.     <tr>
  885.         <td valign="top" width="29%"><font size="2">LibName</font></td>
  886.         <td valign="top" width="71%"><font size="2">Name of the
  887.         typelib in the .IDL file for the project</font></td>
  888.     </tr>
  889.     <tr>
  890.         <td valign="top" width="29%"><font size="2">LibGUID</font></td>
  891.         <td valign="top" width="71%"><font size="2">GUID of the
  892.         typelib</font></td>
  893.     </tr>
  894.     <tr>
  895.         <td valign="top" width="29%"><font size="2">GalleryPath</font></td>
  896.         <td valign="top" width="71%"><font size="2">Points to the
  897.         directory that contains the template files</font></td>
  898.     </tr>
  899.     <tr>
  900.         <td valign="top" width="29%"><font size="2">ProjectName</font></td>
  901.         <td valign="top" width="71%"><font size="2">Name of the
  902.         project</font></td>
  903.     </tr>
  904.     <tr>
  905.         <td valign="top" width="29%"><font size="2">ProjectNameCPP</font></td>
  906.         <td valign="top" width="71%"><font size="2">Name of the
  907.         project cpp file. (projectname.cpp)</font></td>
  908.     </tr>
  909.     <tr>
  910.         <td valign="top" width="29%"><font size="2">ProjectType</font></td>
  911.         <td valign="top" width="71%"><font size="2">type of
  912.         project. EXE or DLL</font></td>
  913.     </tr>
  914.     <tr>
  915.         <td valign="top" width="29%"><font size="2">ProjectAppID</font></td>
  916.         <td valign="top" width="71%"><font size="2">the AppID of
  917.         the local server it the project is of type EXE. Otherwise
  918.         not set</font></td>
  919.     </tr>
  920.     <tr>
  921.         <td valign="top" width="29%"><font size="2">ProjectNameRC</font></td>
  922.         <td valign="top" width="71%"><font size="2">Name of the
  923.         RC file for the project. (Projectname.rc)</font></td>
  924.     </tr>
  925.     <tr>
  926.         <td valign="top" width="29%"><font size="2">ProjectNameHeader</font></td>
  927.         <td valign="top" width="71%"><font size="2">Name of the
  928.         project header. (Projectname.h)</font></td>
  929.     </tr>
  930.     <tr>
  931.         <td valign="top" width="29%"><font size="2">VCINCDIR</font></td>
  932.         <td valign="top" width="71%"><font size="2">Points to vc
  933.         include directory</font></td>
  934.     </tr>
  935.     <tr>
  936.         <td valign="top" width="29%"><font size="2">NULLSTR</font></td>
  937.         <td valign="top" width="71%"><font size="2">set to
  938.         ""</font></td>
  939.     </tr>
  940.     <tr>
  941.         <td valign="top" width="29%"><font size="2">VC</font></td>
  942.         <td valign="top" width="71%"><font size="2">Set to 6.0 in
  943.         VC 6.0</font></td>
  944.     </tr>
  945.     <tr>
  946.         <td valign="top" width="29%"><font size="2">STDAFXH</font></td>
  947.         <td valign="top" width="71%"><font size="2">Set to
  948.         stdafx.h</font></td>
  949.     </tr>
  950.     <tr>
  951.         <td valign="top" width="29%"><font size="2">stdafx.h</font></td>
  952.         <td valign="top" width="71%"><font size="2">Set stdafx.h</font></td>
  953.     </tr>
  954.     <tr>
  955.         <td valign="top" width="29%"><font size="2">STDAFXCPP</font></td>
  956.         <td valign="top" width="71%"><font size="2">Set to
  957.         stdafx.cpp</font></td>
  958.     </tr>
  959.     <tr>
  960.         <td valign="top" width="29%"><font size="2">stdafx.cpp</font></td>
  961.         <td valign="top" width="71%"><font size="2">Set to
  962.         stdafx.cpp</font></td>
  963.     </tr>
  964.     <tr>
  965.         <td valign="top" width="29%"><font size="2">ObjectMap</font></td>
  966.         <td valign="top" width="71%"><font size="2">Set to 1 if
  967.         object map is found. otherwise symbol is not available</font></td>
  968.     </tr>
  969.     <tr>
  970.         <td valign="top" width="29%"><font size="2">ProjectDirectory</font></td>
  971.         <td valign="top" width="71%"><font size="2">Projects
  972.         directory</font></td>
  973.     </tr>
  974.     <tr>
  975.         <td valign="top" width="29%"><font size="2">IDLProject</font></td>
  976.         <td valign="top" width="71%"><font size="2">Name of the
  977.         IDL/ODL file for the project. Set to "" if the
  978.         project does not have an IDL/ODL</font></td>
  979.     </tr>
  980.     <tr>
  981.         <td valign="top" width="29%"><font size="2">ProjectHadIDL</font></td>
  982.         <td valign="top" width="71%"><font size="2">Set to TRUE
  983.         if the project has IDL/ODL file. Otherwise the symbol is
  984.         not available.</font></td>
  985.     </tr>
  986.     <tr>
  987.         <td valign="top" width="29%"><font size="2">CWinApp</font></td>
  988.         <td valign="top" width="71%"><font size="2">If the
  989.         project is MFC then this SYMBOL contains the name of the
  990.         CWinApp derived class otherwise set to ""</font></td>
  991.     </tr>
  992.     <tr>
  993.         <td valign="top" width="29%"><font size="2">MFC</font></td>
  994.         <td valign="top" width="71%"><font size="2">Set to
  995.         "1" for MFC projects. Otherwise not available</font></td>
  996.     </tr>
  997.     <tr>
  998.         <td valign="top" width="29%"><font size="2">MFCCTL</font></td>
  999.         <td valign="top" width="71%"><font size="2">Set to
  1000.         "1" if the project is a MFC control project.
  1001.         otherwise set to "0"</font></td>
  1002.     </tr>
  1003.     <tr>
  1004.         <td valign="top" width="29%"><font size="2">MFCOLE</font></td>
  1005.         <td valign="top" width="71%"><font size="2">Set to
  1006.         "1" if MFC project is MFC control project.
  1007.         Otherwise not available.</font></td>
  1008.     </tr>
  1009.     <tr>
  1010.         <td valign="top" width="29%"><font size="2">ProjectNameSafe</font></td>
  1011.         <td valign="top" width="71%"><font size="2">If the
  1012.         project name contains characters that cannot be used as
  1013.         an identifier the this symbol contain the project name
  1014.         after removing such characters.</font></td>
  1015.     </tr>
  1016. </table>
  1017.  
  1018. <p><font size="2"></font> </p>
  1019.  
  1020. <p><font size="4"><b>Sample Registry files.</b></font></p>
  1021.  
  1022. <pre><b>.RGS file for the wizard.</b></pre>
  1023.  
  1024. <pre><font size="3">HKCR
  1025. {
  1026.     ATLOBJ.ATLWiz = s 'ATL Object Wizard'
  1027.     {
  1028.         CurVer = s 'ATLOBJ.ATLWiz.1'
  1029.         CLSID = s '{2EF12E30-3C3B-11d1-AFA9-00C04FB99436}'
  1030.     }
  1031.     ATLOBJ.ATLWiz.1 = s 'ATL Object Wizard'
  1032.     {
  1033.         CLSID = s '{2EF12E30-3C3B-11d1-AFA9-00C04FB99436}'
  1034.     }
  1035.     NoRemove CLSID
  1036.     {
  1037.         ForceRemove {2EF12E30-3C3B-11d1-AFA9-00C04FB99436} = s 'ATL Object Wizard'
  1038.         {
  1039.             ProgID = s 'ATLOBJ.ATLWiz.1'
  1040.             VersionIndependentProgID = s 'ATLOBJ.ATLWiz'
  1041.             InprocServer32 = s '%Module%'
  1042.         }
  1043.     }
  1044. }
  1045. HKLM
  1046. {
  1047.     Software
  1048.     {
  1049.         Microsoft
  1050.         {
  1051.             DevStudio
  1052.             {
  1053.                 6.0
  1054.                 {
  1055.                     ATLWizard
  1056.                     {
  1057.                         '{6E871954-50AD-11D0-883E-080000185165}'
  1058.                         {
  1059.                             val 'Category' = s 'Objects'
  1060.                             val 'Control' = s 'object.ctl'
  1061.                             val 'Icon' = s 'object.ico'
  1062.                             val 'Name' = s 'Simple Object'
  1063.                         }
  1064.                         '{6E871955-50AD-11D0-883E-080000185165}'
  1065.                         {
  1066.                             val 'Category' = s 'Objects'
  1067.                             val 'Name' = s 'Add-in Object'
  1068.                             val 'Control' = s 'addin.ctl'
  1069.                             val 'Icon' = s 'addin.ico'
  1070.                         }
  1071.                         '{6E871956-50AD-11D0-883E-080000185165}'
  1072.                         {
  1073.                             val 'Category' = s 'Objects'
  1074.                             val 'Name' = s 'Internet Explorer Object'
  1075.                             val 'Control' = s 'ieuiless.ctl'
  1076.                             val 'Icon' = s 'iexplore.ico'
  1077.                         }
  1078.                         '{6E871957-50AD-11D0-883E-080000185165}'
  1079.                         {
  1080.                             val 'Category' = s 'Objects'
  1081.                             val 'Name' = s 'ActiveX Server Component'
  1082.                             val 'Control' = s 'asp.ctl'
  1083.                             val 'Icon' = s 'asp.ico'
  1084.                         }
  1085.                         '{6E871960-50AD-11D0-883E-080000185165}'
  1086.                         {
  1087.                             val 'Category' = s 'Objects'
  1088.                             val 'Name' = s 'MS Transaction Server Component'
  1089.                             val 'Control' = s 'msdtx.ctl'
  1090.                             val 'Icon' = s 'msdtx.ico'
  1091.                         }
  1092.                         '{6E871961-50AD-11D0-883E-080000185165}'
  1093.                         {
  1094.                             val 'Category' = s 'Objects'
  1095.                             val 'Name' = s 'Component Registrar Object'
  1096.                             val 'Control' = s 'compreg.ctl'
  1097.                             val 'Icon' = s 'compreg.ico'
  1098.                         }
  1099.                         '{6E871958-50AD-11D0-883E-080000185165}'
  1100.                         {
  1101.                             val 'Category' = s 'Controls'
  1102.                             val 'Name' = s 'Full Control'
  1103.                             val 'Control' = s 'control.ctl'
  1104.                             val 'Icon' = s 'control.ico'
  1105.                         }
  1106.                         '{6E871959-50AD-11D0-883E-080000185165}'
  1107.                         {
  1108.                             val 'Category' = s 'Controls'
  1109.                             val 'Name' = s 'Lite Control'
  1110.                             val 'Control' = s 'control.ctl'
  1111.                             val 'Icon' = s 'iexplore.ico'
  1112.                             val 'SetSymbol' = s 'IEControl'
  1113.                         }
  1114.                         '{6E87195D-50AD-11D0-883E-080000185165}'
  1115.                         {
  1116.                             val 'Category' = s 'Controls'
  1117.                             val 'Name' = s 'Composite Control'
  1118.                             val 'Control' = s 'control.ctl'
  1119.                             val 'Icon' = s 'compsite.ico'
  1120.                             val 'SetSymbol' = s 'CompositeControl'
  1121.                         }
  1122.                         '{6E871962-50AD-11D0-883E-080000185165}'
  1123.                         {
  1124.                             val 'Category' = s 'Controls'
  1125.                             val 'Name' = s 'HTML Control'
  1126.                             val 'Control' = s 'control.ctl'
  1127.                             val 'Icon' = s 'HTML.ico'
  1128.                             val 'SetSymbol' = s 'HTMLControl'
  1129.                         }
  1130.                         '{6E87195A-50AD-11D0-883E-080000185165}'
  1131.                         {
  1132.                             val 'Category' = s 'Controls'
  1133.                             val 'Name' = s 'Property Page'
  1134.                             val 'Control' = s 'proppage.ctl'
  1135.                             val 'Icon' = s 'proppage.ico'
  1136.                         }
  1137.                         '{6E87195B-50AD-11D0-883E-080000185165}'
  1138.                         {
  1139.                             val 'Category' = s 'Miscellaneous'
  1140.                             val 'Control' = s 'dialog.ctl'
  1141.                             val 'Icon' = s 'dialog.ico'
  1142.                             val 'Name' = s 'Dialog'
  1143.                         }
  1144.                         '{6E87195E-50AD-11D0-883E-080000185165}'
  1145.                         {
  1146.                             val 'Category' = s 'Objects'
  1147.                             val 'Control' = s 'snapin.ctl'
  1148.                             val 'Icon' = s 'snapin.ico'
  1149.                             val 'Name' = s 'MMC SnapIn'
  1150.                         }
  1151.                         '{6E87195C-50AD-11D0-883E-080000185165}'
  1152.                         {
  1153.                             val 'Category' = s 'Data Access'
  1154.                             val 'Name' = s 'Provider'
  1155.                             val 'Control' = s 'provider.ctl'
  1156.                             val 'Icon' = s 'provider.ico'
  1157.                         }
  1158.                         '{6E87195F-50AD-11D0-883E-080000185165}'
  1159.                         {
  1160.                             val 'Category' = s 'Data Access'
  1161.                             val 'Name' = s 'Consumer'
  1162.                             val 'Control' = s 'consumer.ctl'
  1163.                             val 'Icon' = s 'consumer.ico'
  1164.                         }
  1165.                         '{6E871963-50AD-11D0-883E-080000185165}'
  1166.                         {
  1167.                             val 'Category' = s 'Controls'
  1168.                             val 'Name' = s 'Lite Composite Control'
  1169.                             val 'Control' = s 'control.ctl'
  1170.                             val 'Icon' = s 'compsite.ico'
  1171.                             val 'SetSymbol' = s 'CompositeControl,IEControl'
  1172.                         }
  1173.                         '{6E871964-50AD-11D0-883E-080000185165}'
  1174.                         {
  1175.                             val 'Category' = s 'Controls'
  1176.                             val 'Name' = s 'Lite HTML Control'
  1177.                             val 'Control' = s 'control.ctl'
  1178.                             val 'Icon' = s 'HTML.ico'
  1179.                             val 'SetSymbol' = s 'HTMLControl,IEControl'
  1180.                         }
  1181.                     }
  1182.                 }
  1183.             }
  1184.         }
  1185.     }
  1186. }</font></pre>
  1187.  
  1188. <p><font size="3">.RGS file for Names property page.</font></p>
  1189.  
  1190. <pre><font size="3">HKCR
  1191. {
  1192.     Names98.Names98 = s 'Names98 Class'
  1193.     {
  1194.         CurVer = s 'Names98.Names98.1'
  1195.         CLSID = s '{53FCBC28-5015-11d1-AFC7-00C04FB99436}'
  1196.     }
  1197.     Names98.Names98.1 = s 'Names98 Class'
  1198.     {
  1199.         CLSID = s '{53FCBC28-5015-11d1-AFC7-00C04FB99436}'
  1200.     }
  1201.     NoRemove CLSID
  1202.     {
  1203.         ForceRemove {53FCBC28-5015-11d1-AFC7-00C04FB99436} = s 'Names98 Class'
  1204.         {
  1205.             InprocServer32 = s '%MODULE%'
  1206.             {
  1207.                 val ThreadingModel = s 'Apartment'
  1208.             }
  1209.         }
  1210.     }
  1211. }
  1212. </font></pre>
  1213.  
  1214. <p><font size="3"><b><u>Smaple Property Page code</u></b></font></p>
  1215.  
  1216. <p><font size="2"><b>.H File</b></font></p>
  1217.  
  1218. <pre><font size="3">// testpg.h : Declaration of the Ctestpg
  1219.  
  1220. #ifndef __TESTPG_H_
  1221. #define __TESTPG_H_
  1222.  
  1223. #include "resource.h"       // main symbols
  1224.  
  1225. EXTERN_C const CLSID CLSID_testpg;
  1226.  
  1227. /////////////////////////////////////////////////////////////////////////////
  1228. // Ctestpg
  1229. class ATL_NO_VTABLE Ctestpg :
  1230.     public CComObjectRootEx<CComSingleThreadModel>,
  1231.     public CComCoClass<Ctestpg, &CLSID_testpg>,
  1232.     public IPropertyPageImpl<Ctestpg>,
  1233.     public CDialogImpl<Ctestpg>
  1234. {
  1235. public:
  1236.     Ctestpg() 
  1237.     {
  1238.         m_dwTitleID = IDS_TITLEtestpg;
  1239.         m_dwHelpFileID = IDS_HELPFILEtestpg;
  1240.         m_dwDocStringID = IDS_DOCSTRINGtestpg;
  1241.     }
  1242.  
  1243.     enum {IDD = IDD_TESTPG};
  1244.  
  1245. DECLARE_REGISTRY_RESOURCEID(IDR_TESTPG)
  1246.  
  1247. BEGIN_COM_MAP(Ctestpg) 
  1248.     COM_INTERFACE_ENTRY_IMPL(IPropertyPage)
  1249. END_COM_MAP()
  1250.  
  1251. BEGIN_MSG_MAP(Ctestpg)
  1252.     COMMAND_ID_HANDLER(IDC_SET, OnSet);
  1253.     COMMAND_ID_HANDLER(IDC_GET, OnGet);
  1254.     CHAIN_MSG_MAP(IPropertyPageImpl<Ctestpg>)
  1255. END_MSG_MAP()
  1256.  
  1257.     LRESULT OnSet(short , short nID , HWND hWnd, BOOL& bHandled)
  1258.     {
  1259.         CComQIPtr<ISymbolMap, &IID_ISymbolMap> pMap(m_ppUnk[0]);
  1260.         if (!pMap)
  1261.             return S_OK;
  1262.  
  1263.         TCHAR szSymbol[128];
  1264.         TCHAR szValue[128];
  1265.         GetDlgItemText(IDC_SYMBOL, szSymbol, 128);
  1266.         GetDlgItemText(IDC_VALUE, szValue, 128);
  1267.         pMap->Set(CComBSTR(szSymbol), CComBSTR(szValue));
  1268.         return 0;
  1269.     }
  1270.  
  1271.     LRESULT OnGet(short , short nID , HWND hWnd, BOOL& bHandled)
  1272.     {
  1273.         CComQIPtr<ISymbolMap, &IID_ISymbolMap> pMap(m_ppUnk[0]);
  1274.         if (!pMap)
  1275.             return S_OK;
  1276.  
  1277.         TCHAR szSymbol[128];
  1278.         GetDlgItemText(IDC_SYMBOL, szSymbol, 128);
  1279.         CComBSTR szValue;
  1280.         pMap->Get(CComBSTR(szSymbol), &szValue);
  1281.         USES_CONVERSION;
  1282.         SetDlgItemText(IDC_VALUE, OLE2T(szValue));
  1283.  
  1284.         return 0;
  1285.     }
  1286.  
  1287.     STDMETHOD(Apply)(void)
  1288.     {
  1289.         ATLTRACE(_T("Ctestpg::Apply\n"));
  1290.         if (m_hWnd == NULL)
  1291.             return S_OK;
  1292.         CComQIPtr<ISymbolMap, &IID_ISymbolMap> pMap(m_ppUnk[0]);
  1293.         if (!pMap)
  1294.             return S_OK;
  1295.  
  1296.         TCHAR szSymbol[128];
  1297.         TCHAR szValue[128];
  1298.         GetDlgItemText(IDC_SYMBOL, szSymbol, 128);
  1299.         GetDlgItemText(IDC_VALUE, szValue, 128);
  1300.         pMap->Set(CComBSTR(szSymbol), CComBSTR(szValue));
  1301.  
  1302.         m_bDirty = FALSE;
  1303.         return S_OK;
  1304.     }
  1305. };
  1306.  
  1307. #endif //__TESTPG_H_
  1308. </font></pre>
  1309.  
  1310. <p><font size="2"><b>.rgs</b></font></p>
  1311.  
  1312. <pre><font size="3">HKCR
  1313. {
  1314.     testpg.testpg.1 = s 'testpg Class'
  1315.     {
  1316.         CLSID = s '{6992CC0C-472B-11D1-AA8C-000000000000}'
  1317.     }
  1318.     testpg.testpg = s 'testpg Class'
  1319.     {
  1320.         CLSID = s '{6992CC0C-472B-11D1-AA8C-000000000000}'
  1321.         CurVer = s 'testpg.testpg.1'
  1322.     }
  1323.     NoRemove CLSID
  1324.     {
  1325.         ForceRemove {6992CC0C-472B-11D1-AA8C-000000000000} = s 'testpg Class'
  1326.         {
  1327.             ForceRemove 'Programmable'
  1328.             InprocServer32 = s '%MODULE%'
  1329.             {
  1330.                 val ThreadingModel = s 'Apartment'
  1331.             }
  1332.         }
  1333.     }
  1334. }
  1335.  
  1336. </font></pre>
  1337.  
  1338. <p><font size="2"><b>Dialog resource for the page</b></font></p>
  1339.  
  1340. <pre><font size="3">IDD_TESTPG DIALOG DISCARDABLE  0, 0, 271, 105
  1341. STYLE WS_CHILD
  1342. FONT 8, "MS Sans Serif"
  1343. BEGIN
  1344.     EDITTEXT        IDC_SYMBOL,22,24,40,14,ES_AUTOHSCROLL
  1345.     LTEXT           "Symbol",IDC_STATIC,22,8,24,8
  1346.     LTEXT           "Value",IDC_STATIC,87,8,19,8
  1347.     EDITTEXT        IDC_VALUE,87,24,40,14,ES_AUTOHSCROLL
  1348.     PUSHBUTTON      "Set",IDC_SET,22,49,40,14
  1349.     PUSHBUTTON      "Get",IDC_GET,87,49,40,14
  1350. END</font></pre>
  1351.  
  1352. <p><font size="2"><b>String resources.</b></font></p>
  1353.  
  1354. <pre><font size="2">IDS_TITLEtestpg "Title"</font></pre>
  1355.  
  1356. <pre><font size="2">IDS_HELPFILEtestpg "Help File Name"</font></pre>
  1357.  
  1358. <pre><font size="2">IDS_DOCSTRINGtestpg "Your Help String"</font></pre>
  1359.  
  1360. <h1><font size="3"><strong><u>ISymbolMap</u></strong></font></h1>
  1361.  
  1362. <pre>[
  1363.     object,
  1364.     uuid(C6D58201-1FA3-11D0-BF1E-0000E8D0D146),
  1365.     helpstring("ISymbolMap Interface"),
  1366.     pointer_default(unique)
  1367. ]
  1368. interface ISymbolMap : IUnknown
  1369. {
  1370.     HRESULT Set([in] LPCOLESTR strSymbol, [in] LPCOLESTR strValue);
  1371.     HRESULT Get([in] LPCOLESTR strSymbol, [out, retval] BSTR* pstrValue);
  1372.     HRESULT Clear();
  1373.     HRESULT SetStatus(const CLSID* pclsid, BOOL bEnableOK);
  1374. };</pre>
  1375. </body>
  1376. </html>
  1377.