home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / DRAWCL.PAK / README.TXT < prev    next >
Encoding:
Text File  |  1997-05-06  |  6.3 KB  |  150 lines

  1.  
  2.     This is a part of the Microsoft Foundation Classes C++ library.
  3.     Copyright (C) 1992-1995 Microsoft Corporation
  4.     All rights reserved.
  5.  
  6.     This source code is only intended as a supplement to the
  7.     Microsoft Foundation Classes Reference and related
  8.     electronic documentation provided with the library.
  9.     See these sources for detailed information regarding the
  10.     Microsoft Foundation Classes product.
  11.  
  12.  
  13. -------------------------------------------------------
  14. DRAWCLI Sample Microsoft Foundation Classes Application
  15. -------------------------------------------------------
  16.  
  17. The DRAWCLI sample application illustrates the integration of OLE container
  18. support with application-specific features, effective use of polymorphism
  19. in C++, and Windows 95 logo compliance. 
  20.  
  21. OLE container support
  22. ---------------------
  23. The DRAWCLI was originally a stand-alone drawing application developed using 
  24. the MFC classes. The stand-alone version of DRAWCLI was then integrated with 
  25. a second skeleton version of DRAWCLI created using AppWizard's OLE Container 
  26. feature. This process is similar to how the OLE Visual Editing server tutorial 
  27. adds server support to create the Step 7 version of SCRIBBLE. 
  28.  
  29. The design of an MFC OLE container application should look essentially the same, 
  30. regardless of whether you're adding OLE functionality to an existing stand-alone 
  31. MFC (doc/view) application, or whether you're starting with an AppWizard-generated 
  32. OLE container application. The following is a brief description of how DRAWCLI
  33. is separated into application-specific code and OLE container-specific code.
  34.  
  35. Class CDrawObj, implemented in DRAWOBJ.CPP, is a base class for derived "shape" 
  36. classes. This base class handles hit testing of shapes, moving of shapes, and 
  37. resizing of shapes. Through the use of polymorphism, DRAWCLI can interact with
  38. objects of different classes through CDrawObj's interface.
  39.  
  40. Classes CDrawRect and CDrawPoly are derived from CDrawObj. CDrawRect is used to 
  41. draw rectangles, rounded rectangles, ellipses, and lines. CDrawPoly is used to 
  42. draw polygons. These two classes are independent of DRAWCLI's OLE container 
  43. functionality.
  44.  
  45. Class CDrawOleObj is also derived from CDrawObj, and is used to represent OLE 
  46. embedded objects. CDrawOleObj delegates any OLE-specific operation to a contained 
  47. CDrawItem object (described below). For generic shape operations, OLE embedded 
  48. objects are treated like other shape objects in DRAWCLI because CDrawOleObj is 
  49. derived from CDrawObj.
  50.  
  51. Class CDrawItem, derived from COleClientItem, handles all the OLE-specific behavior 
  52. for the OLE embedded object. The implementation of CDrawItem is similar to the 
  53. implementation of the COleClientItem-derived classes in the CONTAIN and OCLIENT 
  54. samples.
  55.  
  56. Class CDrawDoc is derived from COleDocument. The document object maintains a 
  57. CObjList of CDrawObj objects. CDrawDoc delegates several OLE container-specific 
  58. menu commands, such as Edit Paste, Paste Link, and Links, to the base class 
  59. COleDocument.
  60.  
  61. Class CDrawView is derived from CScrollView. The OLE-specific implementation of 
  62. CDrawView is similar to the implementation of the view classes in the CONTAIN and 
  63. OCLIENT samples. The bulk of DRAWCLI's drawing-specific user interface is also 
  64. implemented in CDrawView.
  65.  
  66.  
  67. Windows 95 Logo compliance
  68. --------------------------
  69.  
  70. All MFC applications meet some of the requirements for the Windows 95 logo: 
  71. having a Win32 executable, support for long filenames, support for UNC pathnames, 
  72. use of system colors and metrics, and compatibility with Windows NT. DRAWCLI 
  73. meets the remaining requirements for the Windows 95 logo by including the 
  74. following features:
  75.  - OLE support. DRAWCLI is an OLE container that stores its files in 
  76. the compound file format, supports in-place activation, and acts as a drop 
  77. target for drag-and-drop operations.
  78.  - MAPI support. DRAWCLI provides a "Send as Mail" message on its File menu, 
  79. allowing the user to send a document as a mail attachment. 
  80.  - Compliance with Win95 shell guidelines, including registration of large and 
  81. small icons, use of the system registry instead of an .INI file, and having a 
  82. setup and an uninstall program. For the latter, DRAWCLI includes a script 
  83. compatible with InstallSHIELD, Stirling SoftwareÆs toolkit for creating 
  84. setup and uninstall programs.
  85.  
  86. DRAWCLI also meets the following recommendations for Windows 95 applications:
  87.  - Use of tabbed property pages.
  88.  - Use of Windows 95 common controls.
  89.  - Displays a shortcut menu in response to a right-button mouse click.
  90.  - Storing Summary Information with its documents.
  91.  
  92. In order to use the setup script (SETUP.RUL), you must first install 
  93. InstallSHIELD from the \ishield directory on the CD-ROM. Then create a directory 
  94. tree with the following structure:
  95.  
  96. +--+--DISK1
  97.    |
  98.    +--DATA
  99.       |
  100.       +--PROGRAM
  101.       |
  102.       +--SHARED
  103.       |
  104.       +--SAMPLES
  105.       |
  106.       +--HELP
  107.  
  108. In the DATA directory, create a file named README.TXT (you can use this file). 
  109. In the PROGRAM subdirectory, place a copy of DRAWCLI.EXE. In the SHARED 
  110. subdirectory, place copies of MFC40.DLL, MFCO40.DLL, and MSVCRT40.DLL. In the 
  111. SAMPLES subdirectory, create a file called SAMPLE.DRW. In the HELP subdirectory, 
  112. create a file called DUMMY.HLP.(DRAWCLI does not currently support online help; 
  113. this file is strictly a placeholder for demonstrating the setup program.)
  114.  
  115. In the DISK1 directory, create an empty file named DISK1.ID. This acts as a
  116. disk identifier.
  117.  
  118. Using InstallSHIELD's ICOMP.EXE, compress all the DRAWCLI files into a file 
  119. named DATA.Z using the following command:
  120.  
  121. > icomp data\*.* disk1\data.z -i
  122.  
  123. Using InstallSHIELD's COMPILE.EXE, compile the script SETUP.RUL into SETUP.INS
  124. using the following command:
  125.  
  126. > compile setup.rul
  127.  
  128. Using InstallSHIELD's PACKLIST.EXE, compile the file SETUP.LST into SETUP.PKG 
  129. using the following command:
  130.  
  131. > packlist setup.lst
  132.  
  133. Copy the following files to a floppy disk:
  134.  
  135. (from \Program Files\Stirling\InstallSHIELD\Program)
  136. - SETUP.EXE
  137. - UNINST.EXE
  138. - _SETUP.DLL
  139. - _SETUP.LIB
  140. (from the directory where you placed DRAWCLI)
  141. - SETUP.INS
  142. - SETUP.PKG
  143. (from your DISK1 subdirectory)
  144. - DISK1.ID 
  145. - DATA.Z
  146.  
  147. The resulting floppy disk can be used to install DRAWCLI.
  148.  
  149. See the InstallSHIELD documentation for more information.
  150.