home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / lckowl15 / readme.txt < prev    next >
Encoding:
Text File  |  1993-01-08  |  20.9 KB  |  496 lines

  1. ================================================
  2. README.TXT FOR LCKOWL.DLL Version 1.5
  3.  
  4. This product was developed by LCK
  5. Consulting as shareware for general use.
  6. This software and associated
  7. documentation are provided "as-is" and
  8. without any express or implied
  9. warranties whatsoever.  The user is
  10. advised to test the program thoroughly
  11. before relying on it.  The user assumes
  12. the entire risk of using the program.
  13.  
  14. ================================================
  15.  
  16. Company Information:
  17.  
  18.      Larry Klein
  19.      Principal
  20.      LCK Consulting
  21.      732 Symphony Woods Drive
  22.      Silver Spring, MD  20901
  23.      Phone: 301-593-2745
  24.      Fax: 301-593-4262
  25.  
  26.  
  27. If this program is utilized to your
  28. satisfaction, a $20 shareware fee can be
  29. sent to the above address.  This fee
  30. will go towards upgrading the product.
  31. Your name and address will be placed on
  32. a mailing list for further upgrades.
  33. Where possible, include any bulletin
  34. board address to which notifications can
  35. be sent.
  36.  
  37. ================================================
  38.  
  39.  
  40. Introduction
  41. ============
  42.  
  43. LCKOWL is a set of tools that were written to simplify
  44. managing windows that have more than just the basic
  45. Microsoft Windows components.  LCKOWL is an extension of
  46. Borland's OWL library.  In this release, LCKOWL includes
  47. five OWL-derived window classes:
  48.  
  49.      o    TMDIFrameTools - based on TMDIFrame, this class
  50.           automatically manages a status bar, a tool bar and
  51.           a tool box.  The status bar, tool bar and tool box
  52.           are based on Drover's Toolbox controls.
  53.           TMDIFrameTools also manages groups of child
  54.           windows that have been created using the other
  55.           windows classes that come in this DLL.  When an
  56.           MDI child window is created using one of the
  57.           accompanying TWindow-derived classes, the user can
  58.           easily group similar windows for specific
  59.           functions, including counting and closing a group
  60.           of child windows.
  61.      
  62.      o    TWindowTools - based on TWindow, this class
  63.           extends TWindow in a number of areas.  The class
  64.           provides built-in support for managing a status
  65.           bar, tool bar and toolbox.  As an MDI child
  66.           window, it can be set as a non-resizable window,
  67.           preventing the user from resizing or maximizing
  68.           the window.  Also as an MDI child window the user
  69.           can set a menu associated to it so that when it
  70.           receives focus the frame menu will change to the
  71.           window's menu, and back to the frame menu when it
  72.           looses focus.  Additionally, the class registers
  73.           itself by its title, so that an icon in the
  74.           resource (.RC or .RES) file that shares the title
  75.           name becomes the icon for this window, and any
  76.           other window with an identical name.
  77.      
  78.      o    TMDIChildWindow - based on TWindowTools, this
  79.           class is designed to be used when you need an MDI
  80.           window that includes a dialog box.  The window is
  81.           automatically set not to be resized, and uses a
  82.           parameter that automatically opens a child dialog
  83.           within itself  (using TMDIChildDialog described
  84.           below).  The class automatically manages resizing
  85.           the window at startup, to match that of the dialog
  86.           it contains.  Though the user can't resize the
  87.           window using the keyboard, using the MDI messages
  88.           that cascade and retile child windows a WM_SIZE
  89.           message must be processed, in which case the class
  90.           automatically ensures that the window remains the
  91.           same size as the dialog it contains.
  92.           Additionally, the window manages the focus problem
  93.           inherent in having a dialog box within a MDI child
  94.           window.  NOTE: there is a bug within this version:
  95.           YOU MUST PRESS A KEY FIRST TO START THE TAB KEY
  96.           WORKING IN THE DIALOG BOX.  Because this class is
  97.           derived from TWindowTools, it also supports
  98.           automatic management of status bar, tool bar and
  99.           tool box controls within its window, as well as
  100.           menu management.
  101.      
  102.      o    TMDIChildDialog - based on TDialog, this class is
  103.           used with TMDIChildWindow to manage the focus
  104.           issue of having a dialog within an MDI child
  105.           window.  Additionally, the cancel and OK requests
  106.           within the dialog box automatically close the
  107.           window in which the dialog box is located, in
  108.           addition to the dialog itself.
  109.      
  110.      o    TWindowTable - based on TWindowTools, this class
  111.           manages a table (spreadsheet) that wholly occupies
  112.           the window.  The table control is Protoview's
  113.           Datatable control.  This class manages several
  114.           aspects of the table control, including pure
  115.           virtual functions that can be overloaded for when
  116.           a user double clicks on a row, or when the user
  117.           changes or highlights a row.
  118.  
  119. Drover's Toolbox can be purchased from FarPoint Technologies
  120. or from any number of software vendors that specialize in
  121. software for developers.  FarPoint can be reached at (614)
  122. 765-4333.  If you call FarPoint, please let Tamara Calaway
  123. (Director of Marketing) know that I referred you, and
  124. if there is enough of a response I might be able to get them
  125. to agree that I include more of Drover's toolkit on a review
  126. basis in my next version.
  127.  
  128. Datatable can be purchased from Protoview Development
  129. Corporation or from any number of software vendors that
  130. specialize in software for developers.  Protoview can be
  131. reached at (908) 329-8588.
  132.  
  133. NOTE: BOTH FARPOINT TECHNOLOGIES AND PROTOVIEW HAVE AGREED
  134. TO ALLOW THEIR DLL'S AND A PORTION OF THEIR HEADER AND
  135. LIBRARY FILES TO BE INCLUDED IN THIS PACKAGE.  THIS IS NOT
  136. TO BE TAKEN AS A SALE OF THEIR PRODUCT.  THE ENCLOSED
  137. PACKAGE DOES NOT INCLUDE PORTIONS OF THEIR PRODUCT THAT ARE
  138. NECESSARY TO EXTEND THE TOOLS PROVIDED.  IT IS EXPECTED THAT
  139. ANYONE WHO USES EITHER OR BOTH OF THESE PRODUCTS WILL
  140. PURCHASE THEM AS REQUIRED.
  141.  
  142. NOTE:  There are other toolkits available for the types of
  143. controls that are implemented in this toolkit.  Because of
  144. the way in which the classes are set up, it should be
  145. relatively straightforward to swap toolkits for the controls
  146. used.
  147.  
  148.  
  149. Installation
  150. ============
  151.  
  152. Copy the enclosed .ZIP file to a first-level directory and
  153. unzip.  If this has already been unzipped and is not in a
  154. first-level directory, copy the files into a first-level
  155. directory.
  156.  
  157. COPY ALL DLLs INTO A DIRECTORY ON YOUR PATH, OR PREFERABLY
  158. INTO THE WINDOWS (typically \windows\) DIRECTORY OR THE
  159. WINDOWS SYSTEM (typically \windows\system\) DIRECTORY.  IF
  160. THE DLLs ARE NOT COPIED INTO ONE OF THESE DIRECTORIES,
  161. LCKOWL.DLL AND GENMDIX.EXE WILL NOT KNOW WHERE TO FIND
  162. SUPPORTING DLLS.
  163.  
  164. NOTE: If the files are not in a first level directory, the
  165. project will have to be edited so that the references to the
  166. project files match the directories in which they are
  167. located.
  168.  
  169. NOTE: If Borland's C++ files were not installed in the
  170. default \borlandc\ directory, you will have to update the
  171. Options | Directories in the IDE so that the header and
  172. library files point to the correct locations.
  173.  
  174.  
  175. Quick Explanation
  176. ==================
  177.  
  178. To start, I suggest you first run the enclosed GENMDIX.EXE
  179. application.  It contains the features that demonstrate the
  180. functionality available in LCKOWL.DLL.  GENMDIX.EXE also
  181. serves as a shell MDI application, and can therefore be used
  182. as a basis for creating an OWL-based MDI applications with
  183. status bar, toolbar and toolbox, and any or all of the
  184. enclosed OWL-derived windows.
  185.  
  186.  
  187. Description of Menu Options in GENMDIX.EXE
  188. ------------------------------------------
  189.  
  190.      File | New Window   - Creates a new child window.  The
  191.                purpose of this menu option is to demonstrate
  192.                TWindowTools.  The window supports a child
  193.                window that manages a status bar, tool bar
  194.                and tool box of its own.  Also, it supports
  195.                its own menu (AlternateMenu1 in the resource
  196.                file).
  197.      
  198.      File | New Window With Dialog - Creates a new child
  199.                window that contains an embedded dialog box.
  200.                Demonstrates TMDIChildWindow working with
  201.                TMDIChildDialog.
  202.      
  203.      File | New Window With Table - Creates a new child
  204.                window that contains an embedded spreadsheet
  205.                control.  Demonstrates TWindowTable.
  206.      
  207.      File | How Many Windows of Type - allows user to
  208.                display in a dialog box the number of windows
  209.                that the user designated with a certain ID.
  210.      
  211.      File | Close All Windows of Type - allows user to close
  212.                all windows that the user designated with a
  213.                certain ID.
  214.      
  215.      File | Enter Status Bar Text  - Accepts any character
  216.                string that will be displayed in the first
  217.                status bar field.  This option is only tied
  218.                to the frame window status bar.
  219.      
  220.      File | Enter Status Bar Progress   - Accepts any
  221.                numeric value that will show as a percentage
  222.                progress on the second status bar field.
  223.                This option is only tied to the frame window
  224.                status bar.
  225.      
  226.      Options | Create... - Creates appropriate control.  If
  227.                the focus is on the frame, then the control
  228.                is created in the frame.  Otherwise, it is
  229.                created in the child window that has the
  230.                current focus.
  231.      
  232.      Options | Destroy...     - Destroys appropriate
  233.                control.  If the focus is on the frame, then
  234.                the control is destroyed in the frame.
  235.                Otherwise, it is destroyed in the child
  236.                window that has the current focus.
  237.      
  238.      Options | Toggle... - Toggles appropriate control.  If
  239.                the focus is on the frame, then the control
  240.                is toggled in the frame.  Otherwise, it is
  241.                toggled in the child window that has the
  242.                current focus.
  243.      
  244.      Windows...     - Standard MDI windows routines
  245.  
  246.  
  247.      Explanation of TMDIFrameTools Functions
  248.      ---------------------------------------
  249.  
  250. OWL has certain menu IDs that are reserved so that OWL can
  251. automatically manage certain functions, without the
  252. developer having to code anything.  For example,
  253. CM_CASCADECHILDREN automatically cascades child MDI windows
  254. without having to code a line in the header or source file.
  255. Simply add this as a menu option, derive your MDI window
  256. from TMDIFrame and OWL will take care of cascading children.
  257. (NOTE:  You must add OWLRC.H to your resource so that the
  258. Resource Workshop will recognize these menu IDs).
  259.  
  260. Similarly, TMDIFrameTools has several menu options that
  261. automatically manage status bar, toolbar and toolbox
  262. functionality.  To get these menu IDs to work in your
  263. resource (.RC) file, add the header file LCKOWL2.H to your
  264. resource (File | Add To Project from the Resource Workshop
  265. menu).  By deriving your MDI window from TMDIFrameTools
  266. (which is itself derived from TMDIFrame), the following menu
  267. IDs will automatically work:
  268.  
  269.      IDM_CREATESTATUSBAR
  270.      IDM_CREATETOOLBAR
  271.      IDM_CREATETOOLBOX
  272.      IDM_DESTROYSTATUSBAR
  273.      IDM_DESTROYTOOLBAR
  274.      IDM_DESTROYTOOLBOX
  275.      IDM_TOGGLESTATUSBAR
  276.      IDM_TOGGLETOOLBAR
  277.      IDM_TOGGLETOOLBOX
  278.  
  279. Also, these menu IDs will work on any MDI child windows
  280. derived from one of the window classes in this toolkit.
  281.  
  282. The management of the status bar, tool bar and tool box is
  283. demonstrated in the GENMDIX.EXE application that is
  284. enclosed.  GENMDIX.EXE does not actually have any code
  285. associated with managing these MDI features, except to
  286. initialize them.
  287.  
  288. TMDIFrameTools also manages its child windows as groups, by
  289. providing two functions that count and close child windows
  290. as a group.  By using the other window classes in this
  291. toolkit that automatically stamp a window with an ID,
  292. TMDIFrameTools can count or close all windows that are
  293. stamped with identical IDs.  An ID is any number assigned by
  294. the developer.  GENMDIX.EXE demonstrates this feature by
  295. allowing a user to open a window and assigning it an ID of
  296. the user's choice, and then offering the user menu options
  297. to count or close all windows with identical IDs.  In this
  298. way a developer can manage groups of child windows easily
  299. within an MDI application.  An additional useful function
  300. gets the first child window that matches an ID.
  301.  
  302.  
  303.  
  304.      Explanation of TWindowTools Functions
  305.      -------------------------------------
  306.  
  307. TWindowTools is designed to supply the status bar, tool bar
  308. and tool box functionality found in TMDIFrameTools.  It can
  309. also be set so that the user cannot resize or maximize the
  310. window.  The user can also register a menu to attach to the
  311. window.  When the window gets the focus, the MDI frame will
  312. change to this menu, and then back to the original frame
  313. menu when the window looses focus.
  314.  
  315.  
  316.      Explanation of TMDIChildWindow Functions
  317.      ----------------------------------------
  318.  
  319. TMDIChildWindow is used if you want to use an MDI child
  320. window with a dialog in it.  This class greatly simplifies
  321. creating MDI child windows using dialog resources that can
  322. easily be painted using Resource Workshop or a similar tool,
  323. rather than painting the window directly.  This class
  324. automatically manages the sizing of the window to match that
  325. of the dialog box.  NOTE:  by default this class expects a
  326. TMDIChildDialog-base dialog, and the dialog should be
  327. created using the Child and No Border options in the
  328. Resource Workshop.  This class also manages focus, so that
  329. focus passes to the controls of the dialog within the
  330. window.  Since TMDIChildWindow is based on TWindowTools, it
  331. supports status bar, tool bar and tool box controls, as well
  332. as menu management.
  333.  
  334.  
  335.      Explanation of TMDIChildDialog Functions
  336.      ----------------------------------------
  337.  
  338. TMDIChildDialog is designed to work with TMDIChildWindow so
  339. that focus is properly passed to the controls of the dialog
  340. when the dialog resides in a MDI window.  This class also
  341. manages the cancel and OK buttons, so that they properly
  342. close the window when the dialog is closed.
  343.  
  344.  
  345.      Explanation of TWindowTable Functions
  346.      -------------------------------------
  347.  
  348. TWindowTable creates and manages a spreadsheet control that
  349. wholly occupies the window.  It has two pure virtual
  350. functions that are called when the user double clicks on a
  351. row, or when the user changes the row or selection.  Since
  352. TWindowTable is based on TWindowTools, it supports status
  353. bar, tool bar and tool box controls, as well as menu
  354. management.
  355.  
  356.  
  357.  
  358.      Explanation of Tying Buttons to Menu Commands
  359.      ----------------------------------------------
  360.  
  361. This is automatic, so long as the ID used for a button is
  362. the same as the ID for a menu option.  This relieves the
  363. programmer from any extra coding.  In GENMDIX.EXE, I used
  364. BM1 to represent the File | Enter Status Bar Text, and BM2
  365. to represent File | Enter Status Bar Progress.  The only
  366. requirement was that BM1 and BM2 have the same ID as the
  367. menu options they represent.  You set the ID of a button in
  368. the source file when creating the structure that represents
  369. the toolbar and toolbox.  GENMDIX.CPP contains an example.
  370.  
  371.  
  372. Brief Technical Directions on Using LCKOWL.DLL
  373. ===============================================
  374.  
  375. 1.   Copy ALL the files of this package into a first level
  376.      directory.  Copy ALL DLLs into the \windows or
  377.      \windows\system directory.
  378. 2.   Add the header file TDROVER.H to your source file.  The
  379.      reason this is necessary is because you need some
  380.      identifiers to use the LCKOWL.H file, which in turn
  381.      uses identifiers from toolbox.h, which I could not
  382.      include in this package.  I have therefore included
  383.      only the relevant identifiers in TDROVER.H.  If you
  384.      purchase Drover's toolbox, replace this file with
  385.      toolbox.h (make sure to use the expression extern "C"
  386.      {toolbox.h } when compiling in C++)
  387. 3.   Add the header file LCKOWL.H to your source
  388. 4.   Add the header file LCKOWL2.H to your resource file
  389. 5.   Derive your MDI Frame from TMDIFrameTools
  390. 6.   Derive your MDI child window from either TLCKWindow,
  391.      TMDIChildWindow, or TWindowTable, depending on the
  392.      required functionality
  393. 7.   Initialize the status bar, tool bar or tool box
  394.      controls in the window constructor of your
  395.      TMDIFrameTools class or any of the TWindow-based
  396.      classes using the Init... functions (see GENMDIX.EXE
  397.      for an example).  Follow the format that's found in
  398.      GENMDIX.CPP for creating structures for a status bar,
  399.      tool bar and tool box to be used in the Init...
  400.      functions.  Set any menus using the format found in the
  401.      TMyWindowTools constructor.
  402. 8.   Add LCKOWL.LIB to your project
  403. 9.   If you use Borland-style dialogs, add BWCC.LIB to your
  404.      project and call BWCCGetVersion() at the start of your
  405.      program
  406. 10.  Add the menu options for status bar, toolbar and
  407.      toolbox creation and destruction that are relevant to
  408.      your application
  409. 11.  Compile and have fun running your application!
  410.  
  411.  
  412.  
  413. What Is Included
  414. ================
  415.  
  416. This version includes two projects: LCKOWL.PRJ and
  417. GENMDIX.EXE.
  418.  
  419. The LCKOWL project includes all the source code and other
  420. files to create LCKOWL.DLL, except for the Drover's Toolbox
  421. header and library files.  In order to revise and recompile
  422. LCKOWL.PRJ, you will need to purchase the Drover's Toolbox.
  423. However, because the Drover Toolbox DLLs are distributable,
  424. LCKOWL.DLL can be used as-is since all the necessary
  425. Drover's Toolbox DLLs are included.
  426.  
  427. The GENMDIX.PRJ includes all the files necessary to compile
  428. a general purpose Windows program that includes a status
  429. bar, a tool bar and a toolbox.  The executable, GENMDIX.EXE,
  430. is a fully functional MDI application that makes use of all
  431. the functions available in LCKOWL.DLL.  You can use
  432. GENMDIX.PRJ directly, adding the necessary functionality to
  433. complete an application of your own.  I suggest that you
  434. copy GENMDIX.PRJ (all files beginning with GENMDIX*.*) to
  435. another directory, so that you can have a clean version for
  436. a second application.  Note that the Options | Directories
  437. expect Borland files to be in the default \borlandc\
  438. directory.  Also note that the project expects to be in a
  439. first-level subdirectory, which means that if you copy this
  440. to another level directory, you will have to change the
  441. locations of the project files.
  442.  
  443. This version includes LCKUTIL.DLL, which is used by
  444. LCKOWL.DLL to centrally process standard messages, and to
  445. provide a central location for commonly used functions that
  446. are not available in standard libraries or Windows (such as
  447. word-, rather than string-, oriented functions, and some
  448. file and directory functions).
  449.  
  450.  
  451. Further Description of the TMDIFrameTools in LCKOWL.DLL and
  452. its Associated Project
  453. ============================================================
  454. ===
  455.  
  456. To use TMDIFrameTools, simply specify TMDIFrameTools instead
  457. of TMDIFrame when you derive your own MDI Frame class.
  458. Then, to use any of the controls, simply initialize
  459. whichever or all the three controls using the InitStatusBar,
  460. InitToolBar or InitToolBox functions functions.  A good
  461. example of how to do this can be found in the GENMDIX.PRJ
  462. project.  The rest is managed automatically.
  463.  
  464. What exactly is being managed?  When a statusbar or toolbar
  465. is created, the client area must be adjusted so that a new
  466. window does not overlap the statusbar or toolbar.  In other
  467. words, the statusbar and toolbar must be the topmost window
  468. within the MDI frame.  Further, when the frame is resized
  469. the statusbar and toolbar must be resized accordingly, along
  470. with the client area.  If the user clicks on any of the
  471. buttons on the toolbar or toolbox, then if the ID of the
  472. button matches that of a menu item the menu option should be
  473. initiated.  There should be an easy way of updating text in
  474. the status bar, or if the status bar has a progress line,
  475. then the percentage filled should be easily updated.
  476. Finally, there should be an easy way to have these controls
  477. created, destroyed and toggled on or off using a menu
  478. option.  All this is managed by TMDIFrameTools!
  479.  
  480. To accomplish the last task, that of creating, destroying
  481. and toggling these controls, I have designated menu IDs to
  482. accomplish this along with their identifiers in LCKOWL2.H.
  483. To get these effects with no programming effort, include
  484. LCKOWL2.H in your resource file, and use those IDs for their
  485. appropriate menu items (refer to GENMDIX.RC for an example).
  486. Once these menu IDs are used, TMDIFrameTools manages the
  487. rest automatically.
  488.  
  489.  
  490. More Questions, Suggestions, Criticisms
  491. =======================================
  492.  
  493. Please call me at (301) 593-2745, or fax me at (301) 593-
  494. 2745, or send me a message on Compuserve at 76330,2525.
  495.  
  496.