home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l410 / 1.ddi / CDK / README.TX$ / README.bin
Encoding:
Text File  |  1992-02-13  |  7.4 KB  |  177 lines

  1.  
  2.                               README.TXT
  3.  
  4.       Release Notes for Microsoft (R) Visual Basic Control Development Kit
  5.  
  6.                              Version 1.00
  7.  
  8.                 (C) Copyright Microsoft Corporation, 1991
  9.  
  10. This document contains release notes for version 1.00 of the Microsoft (R)
  11. Control Development Kit for Microsoft (R) Visual Basic for Microsoft (R) 
  12. Windows version 3.0 and later. The information in this document is more 
  13. current than that in the manual.
  14.  
  15. You have a royalty-free right to use, modify, reproduce and distribute
  16. the Sample Custom Control Files (and/or any modified version) in any way
  17. you find useful, provided that you agree that Microsoft has no warranty,
  18. obligation or liability for any Custom Control File.
  19.  
  20.  
  21. ===============================================================================
  22. Contents
  23. ===============================================================================
  24.  
  25. Part    Description
  26. ----    -----------
  27.  
  28. 1       Notes for "Microsoft Visual Basic Control Development Guide"
  29.  
  30. 2       Additional API Calls
  31.  
  32. 3       Miscellaneous Notes and Tips
  33.  
  34.  
  35. ===============================================================================
  36. Part 1: Notes for "Microsoft Visual Basic Control Development Guide"
  37. ===============================================================================
  38.  
  39.         Section\Note
  40.         ------------
  41.  
  42.         Installing the CDK Files
  43.         ------------------------
  44.         The PIX source code directory should also be mentioned
  45.  
  46.         Creating a Toolbox Icon
  47.         -----------------------
  48.         The documentation should state that only four bitmap files are
  49.         required, not six. The down-position bitmaps are not used for
  50.         EGA or monochrome displays; instead, Visual Basic just inverts
  51.         the up-position icon when it is selected. For this reason, the
  52.         sample source code directories provided include only the four
  53.         bitmaps needed.
  54.  
  55.         Packing Data into Bit Fields
  56.         ----------------------------
  57.         The code fragment should use the value 0 rather than 
  58.         OFFSETIN(MYCTL, Language). The OFFSETIN macro cannot be used 
  59.         directly with a bit field. To use OFFSETIN with bit fields, 
  60.         place the bit fields in a nested structure.  Then give the name 
  61.         of the structure as an argument to the OFFSETIN macro.
  62.  
  63.         The EVENTINFO Structure
  64.         -----------------------
  65.         The EVENTINFO structure has an additional field, fl, that occurs
  66.         at the end of the structure. This field can either be 0 or it
  67.         can contain one flag: EF_fNoUnload. When this flag is set, it
  68.         tells Visual Basic not to allow unloading of the current form or
  69.         any control on the form, while the corresponding event procedure
  70.         is being fired. The EF_fNoUnload flag is useful for events that
  71.         must assume that nothing will be unloaded. (The standard Paint
  72.         event is an example.)
  73.  
  74.  
  75. ===============================================================================
  76. Part 2: Additional API Calls
  77. ===============================================================================
  78.  
  79. LPSTR FAR PASCAL VBGetControlName(HCTL hctl, LPSTR lpszName)
  80.  
  81. Copies the name of the specified control into a buffer pointed to by
  82. lpszName. This name is the same as the setting of the CtlName property,
  83. which is unavailable at run time, except through this function. You must
  84. create a buffer of at least 41 bytes, because the function copies
  85. the entire control name and does not truncate. The string copied is
  86. null-terminated.
  87.  
  88.     hctl        HCTL -- Handle to the control.
  89.  
  90.     lpszName    LPSTR -- Pointer to the buffer to receive the string
  91.                          data.
  92.  
  93.  
  94. LONG FAR PASCAL VBSeekFormFile(HFORMFILE hformfile, LONG offset)
  95.  
  96. Moves the current position within a form file. See VBReadFormFile and
  97. VBWriteFormFile in the "Control Development Guide," for more information
  98. on form files and how to get handles to them. When using this function,
  99. make sure that you never seek past the end or before the beginning of a
  100. file.
  101.  
  102.     hformFile   HFORMFILE -- Handle to a form file.
  103.  
  104.     offset      LONG -- Position in the file to which to move, measured
  105.                         in distance in bytes from beginning of the file.
  106.  
  107.  
  108. LONG FAR PASCAL VBRelSeekFormFile(HFORMFILE hformfile, LONG offset)
  109.  
  110. Moves the current position within a form file forward or backward by
  111. the indicated distance. This function is the same as VBSeekFormFile,
  112. except that the position given is relative to the current file position.
  113. When using this function, make sure that you never seek past the end or
  114. before the beginning of a file.
  115.  
  116.     hformFile   HFORMFILE -- Handle to a form file.
  117.  
  118.     offset      LONG -- Distance, measured in bytes, to move forward
  119.                         in the file. Negative value moves file position
  120.                         backward.
  121.  
  122.  
  123. ===============================================================================
  124. Part 3: Miscellaneous Notes and Tips
  125. ===============================================================================
  126.  
  127. Assembling the LIBINIT.ASM File
  128. -------------------------------
  129. Use of an assembler is never required with the Control Development Kit.
  130. Each makefile provided in the source code directories will invoke the
  131. assembler, but only if the file LIBINIT.OBJ is missing. If you delete
  132. this OBJ file, you can copy it from the distribution disk or from another
  133. source code directory. All versions of LIBINIT.OBJ provided are identical.
  134.  
  135.  
  136. Debugging a Custom Control File
  137. -------------------------------
  138. To debug a custom control file, you need to use CodeView for Windows,
  139. version 3.0 or later. Use CodeView to debug VB.EXE, but when prompted
  140. for debugging information, specify the VBX file you wish to debug.
  141. Alternatively, you can start CodeView for Windows and use the /L option
  142. on the command line to load debugging information:
  143.  
  144.     CVW /L PIX.VBX VB.EXE
  145.  
  146. To debug your custom control file, set a breakpoint in the VBX source
  147. file, start Visual Basic, either add the VBX file to the project or load
  148. a project that uses the VBX file, and then create an instance of one
  149. of the controls.
  150.  
  151.  
  152. Duplicate Custom Control Names
  153. ------------------------------
  154. Each control class should be identified with a unique class name. Visual
  155. Basic does not register a control class if a class with that name is
  156. already loaded.
  157.  
  158. Each VBX file should be uniquely identified. If any two VBX files (or
  159. other Windows DLLs) are defined with the same name in their respective
  160. module-definition files, then loading the second VBX file in the same
  161. session of Windows causes Windows to use the first VBX, even though the
  162. actual VBX files may be completely different.
  163.  
  164. For this reason, all VBX files should be kept in one location, with
  165. their file name matching the name in the module-definition file. This
  166. way, two different VBX files with the same name in the module-definition
  167. file cannot reside in the same system, because their file names would
  168. also have to be identical.
  169.  
  170. For similar reasons, it's a good idea to uniquely identify each release
  171. of a custom control file by indicating the release number in the module-
  172. definition file, as well as in the name of the VBX file. For example, to
  173. indicate the first release of the PIX control, you could use a LIBRARY
  174. statement such as:
  175.  
  176.     LIBRARY     PIX100
  177.