home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK8 / MFC / SAMPLES / README.TX$ / readme
Encoding:
Text File  |  1992-03-18  |  32.9 KB  |  771 lines

  1. ========================================================================
  2.       MICROSOFT FOUNDATION CLASS LIBRARY : EXAMPLE CODE
  3. ========================================================================
  4.  
  5. I. Introduction
  6.  
  7. This directory contains all of the Microsoft Foundation Class (MFC)
  8. library example programs, which highlight many object-oriented
  9. Windows programming techniques and class library features.  Each 
  10. example is a complete and functional program that explores
  11. different aspects of the library.
  12.  
  13. These programs are useful as learning tools, when used in conjunction
  14. with the MFC reference documentation.  You can take the code provided
  15. and experiment with it.  One group of sample programs, in the TUTORIAL
  16. subdirectory, supplements the MFC Tutorial and should be studied in
  17. conjunction with that document.
  18.  
  19. Each subdirectory has both PWB-compatible and NMAKE-compatible makefiles.
  20. The PWB makefiles can be identified by the .MAK file extension.  NMAKE
  21. makefiles are called 'makefile', with the exception of the TUTORIAL
  22. subdirectory (the difference is explained in TUTORIAL\README.TXT).
  23.  
  24. -----------------------------------------------------------------------
  25. If you do not have a required C runtime library, you will have to
  26. re-run the C7 SETUP program, selecting the 'Build Additional Libraries'
  27. option.
  28.  
  29. Windows libraries (such as LIBW.LIB and COMMDLG.LIB) are installed
  30. by the Microsoft Windows Software Development Kit (SDK)SETUP program.
  31.  
  32. Windows DLLs (such as SHELL.DLL and MMSYSTEM.DLL) should already
  33. be installed on Windows 3.1 hosts.  These DLLs are also provided by
  34. the Windows 3.1 SDK.
  35. -------------------------------------------------------------------------
  36.  
  37. II. Compiling sample programs with Microsoft NMAKE
  38.  
  39. To compile a sample program with NMAKE:
  40.  
  41. 1. Ensure you have the appropriate C runtime and Foundation
  42. runtime libraries.  The prerequisite libraries for each sample
  43. application are listed in Section IV below.   All MFC library
  44. variants necessary to build the samples are provided in binary
  45. form in MFC\LIB.
  46.  
  47. NOTE: To save disk space, the DEBUG variants have been compiled
  48. without full CodeView information.  By default, DEBUG variants are
  49. compiled with only a few key source modules (startup, main message
  50. pump, and memory diagnostics) compiled with CodeView information.
  51. If you want to trace into all of the MFC libraries while debugging
  52. a sample application, you will have to rebuild the appropriate debug
  53. library variant with CODEVIEW=1 (full CodeView information).  See
  54. MFC\SRC\README.TXT for more information.
  55.  
  56. NOTE: The MFC sample makefiles assume you are using the combined
  57. C runtime libraries with emulator math support.
  58.  
  59. 2. Ensure you have set up your LIB, INCLUDE, and PATH environment variables
  60. appropriately.  For example:
  61.  
  62.    set LIB=C:\C700\MFC\LIB;C:\C700\LIB
  63.    set INCLUDE=C:\C700\MFC\INCLUDE;C:\C700\INCLUDE
  64.    set PATH=C:\C700\BIN;C:\WINDOWS;C:\DOS
  65.  
  66. Remember you must put the MFC\LIB and MFC\INCLUDE directories in
  67. your LIB and INCLUDE paths, respectively, if you wish to compile
  68. Foundation applications.
  69.  
  70. 3. Change your working directory to the appropriate sample file 
  71. directory and invoke NMAKE.  
  72.  
  73. In most cases, invoking NMAKE with no arguments will compile and 
  74. link the retail version of that directory's sample application.  
  75. If you wish to build the debug version, specify 'DEBUG=1' on the 
  76. NMAKE command line.  If you want to remove object, compiled resource, 
  77. and executable files, specify the 'clean' target.  For example:
  78.  
  79.   cd \c700\mfc\samples\about2
  80.   nmake                       ' creates retail version of about2.exe
  81.   nmake clean                 ' removes about2.exe/.obj/.res
  82.   nmake DEBUG=0               ' creates retail version of about2.exe
  83.   nmake clean                 ' removes about2.exe/.obj/.res
  84.   nmake DEBUG=1               ' creates debug version of about2.exe
  85.  
  86. Object and resource files are created in the current directory.
  87.  
  88. Compilation procedures for the tutorial subdirectory are slightly
  89. different than is documented here.  See MFC\SAMPLES\TUTORIAL\README.TXT
  90. for more information.
  91.  
  92. NOTE: See technical note MFC\DOC\TN007.TXT for special information
  93. on setting up your Windows environment to handle Foundation library
  94. debugging output.
  95.  
  96. -----------------------------------------------------------------------
  97.  
  98. III. Compiling sample programs with Programmer's Workbench (PWB)
  99.  
  100. To compile a sample program with PWB:
  101.  
  102. 1. Ensure you have the appropriate C runtime and Foundation
  103. runtime libraries.  The prerequisite libraries for each sample
  104. application are listed in Section IV below.   All MFC library
  105. variants necessary to build the samples are provided in binary
  106. form in MFC\LIB.
  107.  
  108. NOTE: To save disk space, the DEBUG variants have been compiled
  109. without full CodeView information.  By default, DEBUG variants are
  110. compiled with only a few key source modules (startup, main message
  111. pump, and memory diagnostics) compiled with CodeView information.
  112. If you want to trace into all of the MFC libraries while debugging
  113. a sample application, you will have to rebuild the appropriate debug
  114. library variant with CODEVIEW=1 (full CodeView information).  See
  115. MFC\SRC\README.TXT for more information.
  116.  
  117. NOTE: The MFC sample makefiles assume you are using the combined
  118. C runtime libraries with emulator math support.
  119.  
  120. 2. Ensure you have set up your LIB, INCLUDE, and PATH environment variables
  121. appropriately.  For example:
  122.  
  123.    set LIB=C:\C700\MFC\LIB;C:\C700\LIB
  124.    set INCLUDE=C:\C700\MFC\INCLUDE;C:\C700\INCLUDE
  125.    set PATH=C:\C700\BIN;C:\WINDOWS;C:\DOS
  126.  
  127. Remember you must put the MFC\LIB and MFC\INCLUDE directories in
  128. your LIB and INCLUDE paths, respectively, if you wish to compile
  129. Foundation applications.
  130.  
  131. You should normally set these variables before starting Windows or PWB.  If
  132. necessary, you can change environment variables within PWB using the
  133. Options/Environment Variables... dialog.
  134.  
  135. 3. Start PWB.  Use the Project/Open Project... dialog to navigate
  136. through the MFC\SAMPLES directory tree and locate and open the .MAK
  137. file corresponding to the sample you wish to create.
  138.  
  139. 4. Use the Options/Build Options... dialog to select whether you
  140. wish to build a release or debug version of the program.  'Release'
  141. versions use Foundation retail libraries; 'debug' use debug.
  142.  
  143. 5. Select Project/Build: sample.EXE to start the build.
  144.  
  145. 6. If the build completes with no errors, you can run the program.
  146. Use the Run/Execute or Run/Debug menu selections to run Windows
  147. or DOS programs from within PWB.  Note: this feature of PWB requires
  148. that you have the WX Server installed and running.  See the Programmer's
  149. WorkBench documentation for more information on WX Server.
  150.  
  151. You can always run a Windows app outside of PWB using the following
  152. procedure:
  153.  
  154. (If running Windows) - switch (using Alt+Esc) from PWB to the Program
  155. Manager.  Once there, use either File/Run or the File Manager to run
  156. your application.  You can also try using CVW (if debugging) or 
  157. set up an icon to run your program.
  158.  
  159. (If not running Windows) - start Windows in standard or 386-enhanced
  160. mode, then start your application in one of the ways described in 
  161. the preceding paragraph.
  162.  
  163. -----------------------------------------------------------------------
  164.  
  165. IV. Samples
  166.  
  167. Here is a list of the sample directories and an overview of their
  168. content.  See below for more detailed explanations
  169.  
  170.     ABOUT2      simple dialog box example.
  171.     CHART       a simple bar/line charting application.
  172.     CTRLTEST    a control test driver showing custom controls.
  173.     DLLTRACE    example of building a dynamic link library (DLL).
  174.     FILEVIEW    a simple text file viewer.
  175.     HELLO       basic application described in the MFC Tutorial.
  176.     HELLOAPP    an extremely simple MFC application.
  177.     MDI         demonstrates how to program to the MFC MDI interface.
  178.     MINMDI      a bare-bones MDI application.
  179.     MINSVR      a minimal OLE server application.
  180.     MINSVRMI    a minimal OLE server application with multiple inheritance.
  181.     MULTIPAD    an MDI NOTEPAD application.
  182.     OCLIENT     an example of an Object Linking and Embedding (OLE) client.
  183.     OSERVER     a simple OLE server application (called BIBREF)
  184.     RESTOOL     a simple non-Windows tool for Windows resources.
  185.     SHOWFONT    a font attribute viewer.
  186.     SPEAKN      a spelling game that uses sound and pen input.
  187.     TEMPLDEF    a non-Windows tool for expanding C++ templates.
  188.     TESTCLNT    a simple OLE client used to test OLE server applications.
  189.     TESTSERV    a simple OLE server used to test OLE client applications.
  190.     TRACER      a Windows utility to view and set diagnostic trace options.
  191.     TUTORIAL    source for tutorial examples.
  192.  
  193. -------------------------------------------------------------------------
  194.  
  195. ABOUT2\ABOUT2.EXE
  196.  
  197. This program is a re-implementation of the ABOUT program found in
  198. Charles Petzold's book, "Programming Windows"; it has been written
  199. using C++ and the Foundation classes.  ABOUT2 allows you to draw
  200. either a rectangle or an ellipse in one of several colors in the
  201. client area of a application main window.  The source code
  202. illustrates the following concepts:
  203.  
  204.     - Simple Foundation application structuring.
  205.     - Simple dialog box initialization and management.
  206.     - Graphics Device Interface (GDI) wrapper classes.
  207.  
  208. This application requires: SLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  209. (Windows library), and either SAFXCW.LIB (MFC small model Windows 
  210. retail) or SAFXCWD.LIB (MFC small model Windows debug).
  211.  
  212. -------------------------------------------------------------------------
  213.  
  214. CHART\CHART.EXE
  215.  
  216. This program implements a simple bar/line charting application.
  217. You can enter a data set (list of integers), display the data in
  218. bar or line chart form, print the chart, save the data to disk, 
  219. and read in previously saved data.  The source code illustrates
  220. the following concepts:
  221.  
  222.     - Dialog box management.
  223.     - Document state management (dirty, clean).
  224.     - Using GDI calls to draw a graph to a device context.
  225.     - Using Foundation CFile and CArchive classes to save and
  226.       restore user data.
  227.     - Printing.
  228.  
  229. This application requires: MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  230. (Windows library), either MAFXCW.LIB (MFC medium model Windows 
  231. retail) or MAFXCWD.LIB (MFC medium model Windows debug), and
  232. COMMDLG.DLL.
  233.  
  234. -------------------------------------------------------------------------
  235.  
  236. CTRLTEST\CTRLTEST.EXE
  237.  
  238. The main application (in DCONTROL.H, DCONTROL.CPP and DCONTROL.RC)
  239. provides a simple frame window with a single menu to drive the tests.
  240. This can be easily extended to drive additional tests.
  241.  
  242. All the examples are based off a the class CParsedEdit which
  243. is derived from the standard Windows CEdit class.  CParsedEdit
  244. provides a simple keyboard input filter to only allow numbers,
  245. letters, control characters, combinations of the above or any
  246. characters.
  247.  
  248. This sample also includes MUSCROLL.DLL, the "micro scrolling"
  249. custom control provided in the Windows 3.1 SDK, as well as tests
  250. for Pen Windows edit items (requires Windows for Pen).
  251.  
  252. The source code illustrates the following concepts:
  253.  
  254.     - example parsed edit control (CParsedEdit) derived from
  255.         the standard Windows CEdit class.
  256.     - bitmap buttons
  257.     - owner draw/self draw controls
  258.     - owner draw/self draw menus
  259.     - using C++ to create controls for a dialog using Create
  260.         member functions for the controls (not recommended,    
  261.         DERTEST.CPP, DERTEST.DLG)
  262.     - exporting custom controls and registering a new WndClass
  263.         so the controls can be used by the dialog manager
  264.         (the "PAREDIT" control class used in WCLSTEST.CPP
  265.         and WCLSTEST.DLG).  These controls can be edited with the
  266.         SDK dialog editor (DLGEDIT.EXE) as custom controls
  267.         by typing in the class name "PAREDIT" and the
  268.         hex representation of the PES_ styles.
  269.     - using SubclassWindow/SubclassDlgItem to dynamically
  270.         subclass a dialog control to add specialized behaviour
  271.         (SUBTEST.CPP, SUBTEST.DLG).
  272.     - example of an external control packed as a DLL (MUSCROLL.DLL)
  273.         being used by C++ code with a special C++ wrapper class.
  274.     - an example of a spin button using the external MUSCROLL.DLL.
  275.     - examples of Windows for Pen special edit controls
  276.  
  277.     more advanced topics:
  278.     - ON_CONTROL handler (in WCLSTEST.CPP responding to new
  279.             control notification PEN_INVALIDCHAR).
  280.     - example of how style bits (PES_ style bits for the parsed
  281.         edit) can be stripped off before the normal CEdit
  282.         control is created.
  283.  
  284. The source code to this application should be read along with
  285. Foundation technical note 14 (MFC\DOC\TN014.TXT) describing
  286. custom controls and other topics.
  287.  
  288. This application requires: MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  289. (Windows library), either MAFXCW.LIB (MFC medium model Windows 
  290. retail) or MAFXCWD.LIB (MFC medium model Windows debug), and
  291. COMMDLG.DLL.
  292.  
  293. -------------------------------------------------------------------------
  294.  
  295. DLLTRACE\HELLO1.EXE
  296. DLLTRACE\TRACER.DLL
  297.  
  298. The DLLTRACE sample directory contains a simple example of building
  299. a dynamic link library (DLL) that uses MFC Windows classes, and
  300. an application that uses the DLL.  This sample builds in DEBUG
  301. mode only.
  302.  
  303. This application requires: MLIBCEW.LIB (C Windows runtimes for building
  304. an executable), LIBW.LIB (Windows library), LDLLCEW (C Windows runtimes
  305. for building a DLL),  MAFXCWD.LIB (MFC medium model Windows debug)
  306. and LAFXDWD.LIB (MFC large model Windows debug with DLL support).
  307.  
  308. -------------------------------------------------------------------------
  309.  
  310. FILEVIEW\FILEVIEW.EXE
  311.  
  312. This program implements a simple text file viewer.  Unlike 
  313. Windows NotePad, this program places no limit on the size 
  314. of the text file that may be viewed.  This program is for
  315. viewing text files only, and not editing them.  The source code
  316. illustrates the following concepts:
  317.  
  318.     - Foundation application structuring.
  319.     - Use of the Foundation file classes as base
  320.       classes for derivation and specialization.
  321.     - Use of the GDI classes for graphical output.
  322.     - Use of Message Maps for handling window scrolling.
  323.  
  324. This application requires: MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  325. (Windows library), either MAFXCW.LIB (MFC medium model Windows 
  326. retail) or MAFXCWD.LIB (MFC medium model Windows debug), and
  327. COMMDLG.DLL.
  328.  
  329. -------------------------------------------------------------------------
  330.  
  331. HELLO\HELLO.EXE
  332.  
  333. Described in the MFC Tutorial, this application shows the basics of
  334. using the Microsoft Foundation Class Library to write applications
  335. for the Microsoft Windows environment.  This application creates and
  336. displays a fully-functional frame window, which in turn displays a
  337. text string in its center.  The source code illustrates the following
  338. concepts:
  339.  
  340.     - Simple Foundation application structuring.
  341.     - Integrating Windows resources with your application.
  342.  
  343. This application requires: SLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  344. (Windows library), and either SAFXCW.LIB (MFC small model Windows 
  345. retail) or SAFXCWD.LIB (MFC small model Windows debug).
  346.  
  347. -------------------------------------------------------------------------
  348.  
  349. HELLOAPP\HELLOAPP.EXE
  350.  
  351. This is an extremely simple MFC application that simply creates a
  352. main frame window with the caption 'Hello World!'.  It is compiled
  353. using retail libraries only.  HELLOAPP requires: SLIBCEW.LIB (C
  354. Windows runtimes), LIBW.LIB (Windows library), and SAFXCW.LIB (MFC
  355. small model Windows retail).
  356.  
  357. -------------------------------------------------------------------------
  358.  
  359. MDI\MDI.EXE
  360.  
  361. The MDI application demonstrates how to program to the MFC wrapper of 
  362. the Windows Multiple Document Interface (MDI) wrapper.  When started,
  363. the MDI application provides an MDI frame window, and two kinds of MDI
  364. child windows that you may open within the frame.  One child window
  365. is similar to the HELLO example program (it displays "Hello World"
  366. in its client area).  The other kind of child window contains a 
  367. bouncing ball.  The source code illustrates the following concepts:
  368.  
  369.     - Foundation MDI application structuring.
  370.     - Coordinating MDI frame and child classes.
  371.     - Using Windows timers.
  372.     - Using the CBitmap class for constructing and drawing a
  373.       bit pattern into a device context.
  374.  
  375. This application requires: MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  376. (Windows library), and either MAFXCW.LIB (MFC medium model Windows
  377. retail) or MAFXCWD.LIB (MFC medium model Windows debug).
  378.  
  379. -------------------------------------------------------------------------
  380.  
  381. MINMDI\MINMDI.EXE
  382.  
  383. This is a bare-bones MDI application that concentrates on showing the
  384. minimum work needed to set up and maintain MDI child windows within
  385. an MDI frame window.  You can use this application as a starting point
  386. for your own experimentation with the MDI interface.  The source code
  387. illustrates the following concepts:
  388.  
  389.     - Foundation MDI application structuring.
  390.     - Coordinating MDI frame and child classes.
  391.  
  392. This application requires: SLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  393. (Windows library), and either SAFXCW.LIB (MFC small model Windows 
  394. retail) or SAFXCWD.LIB (MFC small model Windows debug).
  395.  
  396. -------------------------------------------------------------------------
  397.  
  398. MINSVR\MINSVR.EXE
  399.  
  400. MINSVR is a minimal OLE server application that implements
  401. a graphical ellipse drawing.  When running MINSVR *directly* (from
  402. the program manager, file manager, or an icon), MINSVR is registered
  403. with the registration data base.  YOU MUST RUN MINSVR DIRECTLY before
  404. you can use it with other OLE programs.  Once you have run MINSVR
  405. directly, you can use it with OLE Clients where it provides basic
  406. embeddable object services.
  407.  
  408. The source code illustrates the following concepts:
  409.  
  410.     - Constructing a minimal OLE server
  411.     - Programming with the MFC OLE classes
  412.     - Supporting embedded objects
  413.  
  414. It is highly recommended that you read Foundation technical notes 8, 9,
  415. and 10 (MFC\DOC\TN008.TXT, etc.) for more information on the MFC OLE
  416. classes and constructing OLE clients and servers using MFC.
  417.  
  418. MINSVR requires:  MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  419. (Windows library), either MAFXCW.LIB (MFC medium model Windows
  420. retail) or MAFXCWD.LIB (MFC medium model Windows debug), COMMDLG.DLL,
  421. COMMDLG.LIB (standard Windows dialogs), SHELL.DLL, SHELL.LIB (OLE
  422. registration libraries), OLESVR.DLL, and OLESVR.LIB (OLE server
  423. libraries).
  424.  
  425.  
  426. -------------------------------------------------------------------------
  427.  
  428. MINSVRMI\MINSVRMI.EXE
  429.  
  430. MINSVRMI is a simple OLE server application that implements a
  431. graphical elliptical drawing.  It is the same program as MINSVR
  432. except it is implemented using multiple inheritance.  When MINSVRMI is
  433. *directly* run, it registers itself with the registration database. 
  434. YOU MUST RUN MINSVRMI directly before using it with other OLE
  435. programs.  When run from an OLE client, MINSVRMI allows you to embed
  436. objects in the client application's document.
  437.  
  438. The source code illustrates the following concepts:
  439.  
  440.     - Constructing a minimal OLE server
  441.     - Programming with the MFC OLE classes
  442.     - Using multiple inheritance with MFC and MFC OLE classes
  443.     - Supporting embedded objects
  444.  
  445. It is highly recommended that you read Foundation technical notes 8, 9,
  446. and 10 (MFC\DOC\TN008.TXT, etc.) for more information on the MFC OLE
  447. classes and constructing OLE clients and servers using MFC.
  448.  
  449. You should also read Foundation technical note 16 (MFC\DOC\TN016.TXT)
  450. for more information on MFC and multiple inheritance.
  451.  
  452. MINSVRMI requires:  MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  453. (Windows library), either MAFXCW.LIB (MFC medium model Windows
  454. retail) or MAFXCWD.LIB (MFC medium model Windows debug), COMMDLG.DLL,
  455. COMMDLG.LIB (standard Windows dialogs), SHELL.DLL, SHELL.LIB (OLE
  456. registration libraries), OLESVR.DLL, and OLESVR.LIB (OLE server
  457. libraries).
  458.  
  459. -------------------------------------------------------------------------
  460.  
  461. MULTIPAD\MULTIPAD.EXE
  462.  
  463. Microsoft Windows provides a simple application called NOTEPAD.  The
  464. MFC library adaptation of this program uses the MDI paradigm to allow
  465. the user to manipulate any number of concurrently open text files. 
  466. MULTIPAD is fully functional and includes printing support as well as
  467. other features usually found only in commercial Windows applications:
  468. a status bar at the bottom of the window, and a cache of
  469. most-recently-used filenames (saved between program invocations) so
  470. that users may quickly access recently used documents.  The source
  471. code illustrates the following concepts:
  472.  
  473.     - Non-trivial MDI application structuring.
  474.     - Menu command dispatching.
  475.     - Dialog box initialization and management.
  476.     - Printing.
  477.     - Porting existing Windows code for use with MFC.
  478.     - Swap tuning an application for Windows for maximum efficiency.
  479.  
  480. This application requires: MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  481. (Windows library), either MAFXCW.LIB (MFC medium model Windows 
  482. retail) or MAFXCWD.LIB (MFC medium model Windows debug), and
  483. COMMDLG.DLL.
  484.  
  485. -------------------------------------------------------------------------
  486.  
  487. OCLIENT\OCLIENT.EXE
  488.  
  489. OCLIENT is an example of an Object Linking and Embedding (OLE) client
  490. application.  It uses the Foundation OLE classes.  This program is a port
  491. of the OLEDEMOC program which is shipped by the Microsoft OLE Software
  492. Development Kit.  The program allows you to insert both embedded and
  493. linked objects into a document.  OCLIENT also allows you to perform both
  494. file and clipboard operations on the objects as well as activate the
  495. servers to which the objects belong. The source code illustrates the
  496. following concepts:
  497.  
  498.     - OLE client programming using MFC
  499.     - Inserting embedded objects into a client
  500.     - Pasting linked and embedded objects into a client
  501.     - Copying objects to the clipboard
  502.     - Loading and saving objects to and from disk
  503.  
  504. It is highly recommended that you read Foundation technical notes 8, 9,
  505. and 10 (MFC\DOC\TN008.TXT, etc.) for more information on the MFC OLE
  506. classes and constructing OLE clients and servers using MFC.
  507.  
  508. OCLIENT requires:  MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  509. (Windows library), either MAFXCW.LIB (MFC medium model Windows
  510. retail) or MAFXCWD.LIB (MFC medium model Windows debug), COMMDLG.DLL,
  511. COMMDLG.LIB (Standard Windows Dialogs), SHELL.DLL, SHELL.LIB (OLE
  512. Registration libraries), OLECLI.DLL, and OLECLI.LIB (OLE Client
  513. libraries).
  514.  
  515. -------------------------------------------------------------------------
  516.  
  517. OSERVER\BIBREF.EXE
  518.  
  519. BIBREF is a simple OLE server application that implements
  520. bibliographical references.  When BIBREF is *directly* run, it
  521. registers itself with the registraton database and allows you to add,
  522. modify, and delete bibliographical references from a list maintained
  523. by the application.  YOU MUST RUN BIBREF DIRECTLY before using it
  524. with other OLE programs.  When run from an OLE client, BIBREF allows
  525. you to embed objects containing these references in the client
  526. application's document.
  527.  
  528. The source code illustrates the following concepts:
  529.  
  530.     - Constructing an OLE server
  531.     - Programming with the MFC OLE classes
  532.     - Supporting embedded objects
  533.  
  534. It is highly recommended that you read Foundation technical notes 8, 9,
  535. and 10 (MFC\DOC\TN008.TXT, etc.) for more information on the MFC OLE
  536. classes and constructing OLE clients and servers using MFC.
  537.  
  538. OSERVER requires:  MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  539. (Windows library), either MAFXCW.LIB (MFC medium model Windows
  540. retail) or MAFXCWD.LIB (MFC medium model Windows debug), COMMDLG.DLL,
  541. COMMDLG.LIB (standard Windows dialogs), SHELL.DLL, SHELL.LIB (OLE
  542. registration libraries), OLESVR.DLL, and OLESVR.LIB (OLE server
  543. libraries).
  544.  
  545. -------------------------------------------------------------------------
  546.  
  547. RESTOOL\RESTOOL.EXE
  548.  
  549. RESTOOL is a simple non-Windows application that reads a Microsoft
  550. Windows compiled resource (.RES) file and generates C++ class
  551. declarations for any dialog boxes found in the resource file.
  552. This allows you to quickly put together MFC CDialog-derived classes
  553. that manipulate dialog boxes you already use in existing applications.
  554.  
  555. RESTOOL's output must be reviewed before using (RESTOOL uses some
  556. heuristics that are not universally applicable) and you must put the 
  557. generated code into a proper C++ header file.  The source code
  558. illustrates the following concepts:
  559.  
  560.     - Using MFC libraries to write a non-Windows application.
  561.     - Microsoft Windows resource file format.
  562.  
  563. RESTOOL requires: MLIBCE.LIB (DOS C runtimes), and either MAFXCR.LIB
  564. (MFC medium model DOS retail) or MAFXCRD.LIB (MFC medium model DOS
  565. debug).
  566.  
  567. -------------------------------------------------------------------------
  568.  
  569. SHOWFONT\SHOWFONT.EXE
  570.  
  571. This program is a C++/Foundation adaptation of a sample application
  572. provided in the Microsoft Windows 3.0 Software Development Kit (SDK).
  573. SHOWFONT is a font attribute viewer.  It allows you to quickly
  574. determine the visual and logical characteristics of Windows GDI FONT
  575. resources.  The source code illustrates the following concepts:
  576.  
  577.     - Modal and modeless dialog box management.
  578.     - CFont attribute manipulation.
  579.     - Menu command dispatching.
  580.  
  581. This application requires: MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  582. (Windows library), and either MAFXCW.LIB (MFC medium model Windows 
  583. retail) or MAFXCWD.LIB (MFC medium model Windows debug).
  584.  
  585. -------------------------------------------------------------------------
  586.  
  587. SPEAKN\SPEAKN.EXE
  588.  
  589. SPEAKN is a simple Windows application that brings together graphics
  590. output, sound output and handwriting recognition.  This highlights
  591. the MultiMedia and Pen extensions made to Windows 3.1.
  592.  
  593. This application will only run under Windows 3.1.  A sound card
  594. is required (for sound prompts).  Windows for Pen is also required
  595. (the pen simulator provided in the Windows 3.1 SDK is sufficient).
  596.  
  597. You should read Foundation technical note 15 (MFC\DOC\TN015.TXT)
  598. for more information on the MFC support for Windows for Pen.
  599.  
  600. The source code illustrates the following concepts:
  601.     - single dialog application
  602.     - Using bitmap buttons
  603.     - Sound output
  604.     - Pen input (BEdit)
  605.     - resizing a BEdit
  606.     - storing MultiMedia data (sounds, bitmaps) in resources
  607.  
  608. This application requires: MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  609. (Windows library), MMSYSTEM.LIB (MultiMedia extensions to Windows),
  610. and either MAFXCW.LIB (MFC medium model Windows retail) or MAFXCWD.LIB
  611. (MFC medium model Windows debug).
  612.  
  613. -------------------------------------------------------------------------
  614.  
  615. TEMPLDEF\TEMPLDEF.EXE
  616.  
  617. TEMPLDEF is a non-Windows tool that helps you write and use 
  618. template-like classes.  Templates are a proposed (but not established)
  619. C++ language feature that are very useful for industrial-strength
  620. programming.  The MFC library's collection classes use template
  621. classes (and the tool provided in this directory) to create specific
  622. collection types from general collection types.
  623.  
  624. The C++ language will someday support such features, but this tool
  625. makes some of these proposed advantages available now.  TEMPLDEF
  626. reads a "template" file, and writes a new C++ class which is
  627. type-safe.
  628.  
  629. After you have built the templdef tool, you can use the MKCOLL.BAT
  630. batch file and the array, list, and map template files (all in the
  631. TEMPLDEF subdirectory) to generate your own versions of arrays,
  632. lists, and maps.
  633.  
  634. For more information on the templdef tool, see MFC Technical Note #4,
  635. "Template Classes and AFX" (located in MFC\DOC\TN004.TXT).  For more
  636. information on proposed C++ templates, see Chapter 14 of "The Annotated
  637. C++ Reference Manual," by Ellis and Stroustrup.
  638.  
  639. This application requires: MLIBCE.LIB (DOS C runtimes), and either
  640. MAFXCR.LIB (MFC medium model DOS retail) or MAFXCRD.LIB (MFC medium
  641. model DOS debug).
  642.  
  643. -------------------------------------------------------------------------
  644.  
  645. TESTCLNT\TESTCLNT.EXE
  646.  
  647. TESTCLNT is a simple testing program for OLE servers.  It should only
  648. be used by knowledgeable OLE developers.  All others should refer to
  649. the OCLIENT sample program for information.  TESTCLNT acts as a
  650. simple OLE client and provides a full feature list that most servers
  651. will wish to support.  It also provides a robust, error-checking,
  652. environment to help track down bugs.  TESTCLNT allows you to call
  653. some of the OLE APIs directly from the menu (only do this if you have
  654. a good understanding of OLE as you can hang your machine). TESTCLNT's
  655. source code illustrates the following concepts:
  656.  
  657.     - Implementing a robust OLE environment
  658.     - Programming using the MFC OLE classes
  659.     - Testing OLE Servers
  660.  
  661. It is highly recommended that you read Foundation technical notes 8, 9,
  662. and 10 (MFC\DOC\TN008.TXT, etc.) for more information on the MFC OLE
  663. classes and constructing OLE clients and servers using MFC.
  664.  
  665. TESTCLNT requires:  MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  666. (Windows library), either MAFXCW.LIB (MFC medium model Windows
  667. retail) or MAFXCWD.LIB (MFC medium model Windows debug), COMMDLG.DLL,
  668. COMMDLG.LIB (Standard Windows Dialogs), SHELL.DLL, SHELL.LIB (OLE
  669. Registration libraries), OLECLI.DLL, and OLECLI.LIB (OLE Client
  670. libraries).
  671.  
  672. -------------------------------------------------------------------------
  673.  
  674. TESTSERV\TESTSERV.EXE
  675.  
  676. TESTSERV is a simple data-oriented OLE Server.  Its purpose is to
  677. test OLE clients.  Only knowledgeable OLE developers should use
  678. TESTSERV.  All others should refer to the OSERVER, MINSVR, or
  679. MINSVRMI programs for information on OLE servers.  TESTSERV allows
  680. you to enter a simple line of text which can then be embedded or
  681. linked by a client. TESTSERV also allows you to call some of the OLE
  682. APIs directly from the menu (this is not recommended unless you have
  683. a good understanding of OLE as you can hang your machine). YOU MUST
  684. RUN TESTSERV DIRECTLY before using it to embed objects into OLE
  685. clients.  Running TESTSERV directly causes it to register itself
  686. with the registration database.  TESTSERV's source code illustrates
  687. the following concepts:
  688.  
  689.     - Providing a more robust environment for OLE servers
  690.     - Programming in OLE with the MFC OLE classes
  691.     - Providing linking services.
  692.     - Providing embedding services.
  693.     - Providing file services for OLE servers
  694.  
  695.  
  696.  
  697. It is highly recommended that you read Foundation technical notes 8, 9,
  698. and 10 (MFC\DOC\TN008.TXT, etc.) for more information on the MFC OLE
  699. classes and constructing OLE clients and servers using MFC.
  700.  
  701. TESTSERV requires:  MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  702. (Windows library), either MAFXCW.LIB (MFC medium model Windows
  703. retail) or MAFXCWD.LIB (MFC medium model Windows debug), COMMDLG.DLL,
  704. COMMDLG.LIB (Standard Windows Dialogs), SHELL.DLL, SHELL.LIB (OLE
  705. Registration libraries), OLESVR.DLL, and OLESVR.LIB (OLE Server
  706. libraries).
  707.  
  708. -------------------------------------------------------------------------
  709.  
  710. TRACER\TRACER.EXE
  711.  
  712. TRACER is a tiny Windows utility that allows you to view and set the 
  713. Foundation Windows diagnostic trace option flags described in 
  714. MFC\DOC\TN007.TXT.  The source code illustrates the following concepts:
  715.  
  716.     - Reading and writing Windows profile strings
  717.     - Writing a Foundation application that uses a modal dialog
  718.       box but does not use the regular Windows/MFC message pump.
  719.  
  720. TRACER requires: SLIBCEW.LIB (Windows C runtimes), and either SAFXCW.LIB
  721. (MFC small model Windows retail) or SAFXCWD.LIB (MFC small model Windows
  722. debug).
  723.  
  724. -------------------------------------------------------------------------
  725.  
  726. TUTORIAL\PHBOOK.EXE
  727.  
  728. PHBOOK is a phone list maintenance application, and is the subject
  729. of the MFC tutorial.  PHBOOK allows you to create, edit, print and
  730. save lists of people's names and their telephone numbers.  In addition
  731. to MFC application programming techniques, this application demonstrates 
  732. the development of an abstract data model and the coupling of that
  733. data model to a graphical user interface implemented with MFC.  See
  734. TUTORIAL\README.TXT for more information on building this application.
  735. The source code illustrates the following concepts:
  736.  
  737.     - MFC Application organization.
  738.     - Printing.
  739.     - Dialog box management.
  740.     - Coupling an abstract data model to a user interface.
  741.     - Using MFC object serialization (CArchive class) to save
  742.       and load user data.
  743.  
  744. PHBOOK requires: MLIBCEW.LIB (C Windows runtimes), LIBW.LIB
  745. (Windows library), either MAFXCW.LIB (MFC medium model Windows 
  746. retail) or MAFXCWD.LIB (MFC medium model Windows debug), and
  747. COMMDLG.LIB.
  748.  
  749.  
  750. TUTORIAL\CMDBOOK.EXE
  751.  
  752. CMDBOOK is a DOS application that implements a simple character mode
  753. interface to the phone book database.
  754.  
  755. This application requires: MLIBCE.LIB (DOS C medium model runtimes),
  756. either MAFXCR.LIB (MFC medium model DOS retail) or MAFXCRD.LIB (MFC medium
  757. model DOS debug).
  758.  
  759.  
  760. TUTORIAL\DMTEST.EXE
  761.  
  762. DMTEST is a DOS application that tests the tutorial's data model
  763. classes. It does not have any real function other than as a quick
  764. acceptance test.
  765.  
  766. This application requires: MLIBCE.LIB (DOS C medium model runtimes)
  767. and either MAFXCR.LIB (MFC medium model DOS retail) or MAFXCRD.LIB (MFC
  768. medium model DOS debug).
  769.  
  770. -------------------------------------------------------------------------
  771.