home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / OTHERUTI / MASTER-2.ZIP / DLGDSNC / DLGDSNC.LZH / DLGDSNC.DOC next >
Text File  |  1991-11-08  |  7KB  |  265 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                                            November 8, 1991
  9.  
  10.                               DLGDSN Version 1.2
  11.  
  12.                   A Dialogbox Design Program for Turbo Vision
  13.  
  14.                     (C) Copyright 1990 by L. David Baldwin.  
  15.                              All Rights Reserved.
  16.  
  17.   Further copyright information given below
  18.  
  19.  
  20.   OVERVIEW
  21.  
  22.   DLGDSN takes some of the pain out of designing dialog boxes for Borland's 
  23.   new Turbo Vision package.  With DLGDSN, dialog views can be easily added, 
  24.   edited, rearranged, and the dialogbox itself sized, moved, etc.  Once the 
  25.   design is satisfactory, DLGDSN can produce source code for the dialogbox to 
  26.   be included in your program. 
  27.  
  28.  
  29.   REQUIREMENTS
  30.  
  31.     Borland's C++ version 2.0
  32.     Borland's Turbo Vision package
  33.     A mouse is desirable
  34.  
  35.   The following files are supplied:
  36.  
  37.   DLGDSNC.EXE    The design program
  38.   DLGHLPC.HLP    Online help file
  39.   DLGDSNC.DOC    This one
  40.   TESTCASE.CPP   A test program to check the source code produced by DLGDSN
  41.  
  42.  
  43.   DESIGNING A DIALOG BOX
  44.  
  45.   DLGDSN has three modes of operation:
  46.  
  47.     Design Mode
  48.  
  49.     DLGDSN begins in design mode and this is the mode that you use for all 
  50.     layout work and editing.  In design mode, the dialogbox doesn't look or 
  51.     act quite like it will in the final design.  For one thing, there is a 
  52.     'canvas' background which helps show the actual space occupied by the 
  53.     views.  Also, to facilitate editing, all views can be selected using the 
  54.     mouse or tab key though some won't be selectable in an actual dialogbox.
  55.  
  56.     Try Mode
  57.  
  58.     Try mode is entered using the F9 key.  In try mode, the dialogbox behaves 
  59.     as it's supposed to.  You can check the Tab order, make temporary 
  60.  
  61.  
  62.                                       1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.     entries, and push buttons to actually check how things will work.  Exit 
  75.     try mode with the escape key or click on the close box.
  76.  
  77.     Ordering Mode
  78.  
  79.     Ordering mode allows you to change the Tab order of your dialogbox.  The 
  80.     method for doing this is discussed further below.  The F8 key toggles you 
  81.     into and out of ordering mode.
  82.  
  83.   While there is no fixed way to design a dialogbox, here's one suggested 
  84.   sequence:
  85.  
  86.   1.In design mode, work with the dialogbox fully zoomed.
  87.  
  88.   2.From the Add menu, select a view to add.  This will bring up a dialogbox 
  89.     where you can enter the necessary information.  Use the online help (F1 
  90.     key) if you have a question as to what goes in a particular field.  When 
  91.     the OK button is pushed, the view will appear somewhere in the (fully 
  92.     zoomed) design box.  The view is then positioned by dragging it with the 
  93.     mouse, or by using the arrow keys (Shift+arrow moves a little faster).  
  94.     Work in the upper left corner of the box.
  95.  
  96.   3.Continue adding views as desired.  At any time, views can be repositioned 
  97.     with the mouse or arrow keys.  If something other than position needs 
  98.     changing, select the view and from the Edit menu choose Edit Selected (or 
  99.     use F7).  This will bring up its dialogbox for changes.
  100.  
  101.   4.When all the views have been added and positioned, size the box to fit 
  102.     and move it to the desired location on the desktop.  Be sure and add a 
  103.     title (Dialog Title from the Edit menu).
  104.  
  105.   5.Enter Try Mode with the F9 key and test the dialogbox.  Be sure to check 
  106.     how the views sequence using the Tab key.  Exit Try mode with Esc or 
  107.     click on the close box.
  108.  
  109.   6.If the Tab sequence needs changing, use F8 to enter ordering mode.  With 
  110.     the mouse, click on each view to establish the desired order.   Exit back 
  111.     to design mode with F8.
  112.  
  113.     Changing the sequence without a mouse is a little more complicated.  Use 
  114.     the Tab key to select (highlight) the next view to be sequenced.  Then 
  115.     press the Enter key to enter the selected view into the sequence.  After 
  116.     all views have been entered, exit back to design mode with F8.
  117.  
  118.     Some views (such as Static Text, Labels, Scrollbars) don't enter into the 
  119.     tab sequence of a dialogbox.  You can order these if it's convenient, but 
  120.     the order won't effect the final results.  
  121.  
  122.     Be sure to recheck the tab order in Try mode.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                       2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.   7.This is a good time to save your work.  Choose Save or Save As from the 
  141.     File menu to create or update a .DLG file.  Any file with the same name 
  142.     will be renamed with a .BKP extension.
  143.  
  144.   8.To create source code for your dialogbox, choose Write Source from the 
  145.     Operations menu and choose a filename (.SRC is the default extension).  
  146.     The source code produced will consist of a dialogbox definition function 
  147.     and a data record with fields matching those required by the dialogbox's 
  148.     SetData and GetData methods.
  149.  
  150.     The .SRC file generated may be inserted directly into TESTCASE.CPP (at 
  151.     the line of asterisks) to provide a program to test the dialogbox.
  152.  
  153.  
  154.   SOME DETAILS
  155.  
  156.   Class Names
  157.  
  158.   Many of the Add/Edit dialogboxes have a field labeled 'Class Name'.  By 
  159.   default, this field contains the standard Turbo Vision name for the view.  
  160.   This field exists for situations where it may be desirable to use a derived 
  161.   view which doesn't differ much from its standard view parent.  The class 
  162.   name entered here will be the one used when generating the source code for 
  163.   the dialogbox.  
  164.  
  165.   Help Context
  166.  
  167.   Many of the Add/Edit dialogboxes also have fields labeled Help Context and
  168.   Value.  By default, these contain hcNoContext and 0.  DLGDSN uses the help 
  169.   context ID when generating source code and the value when producing a 
  170.   resource.
  171.  
  172.   For small projects, it may be convenient just to enter this information by 
  173.   hand.  However, if you're using Borland's demo help compiler, TVHC, DLGDSN 
  174.   can work with the help definition file it produces.  To do this, choose 
  175.   Load Help ctx file from the Options menu and supply the filename of the 
  176.   help definition file.  Then clicking on the '*' box next to the help 
  177.   context field (or typing '*' in the field) will bring up a pick list of the 
  178.   definitions from which to choose.
  179.  
  180.  
  181.  
  182.   COPYRIGHT
  183.  
  184.   Documentation and Program (C) Copyright 1990 by L. David Baldwin.  
  185.   All Rights Reserved.
  186.  
  187.   DLGDSN may be copied and distributed freely by individuals to friends and 
  188.   acquaintances providing that no fee is charged and it is not part of a 
  189.   package for which a charge is made.
  190.  
  191.  
  192.  
  193.  
  194.                                       3
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.   Source code for DLGDSN is available for $15 (need not be sent in advance).
  207.   The bad news for C++ users is that the source is written in Turbo Pascal 
  208.   version 6.0.
  209.  
  210.   Also please report any problems, suggestions, etc.
  211.  
  212.   Contact me by Compuserve (the best way) or at one of the addresses below.
  213.  
  214.   Dave Baldwin
  215.   CompuServe ID #76327,53.
  216.  
  217.   22 Fox Den Rd.,
  218.   Hollis, NH 03049        (Summer)
  219.   (603) 465-7857
  220.  
  221.   144 13th St. East,
  222.   Tierra Verde, FL 33715  (Winter, of course)
  223.   (813) 867-3030
  224.  
  225.  
  226.   CHANGES
  227.  
  228.   Vers 1.1  Fixed crash when Try mode toggled and no views present.
  229.   Vers 1.2  Added C++ source compile option.  Minor fixes.
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                       4
  261.  
  262.  
  263.  
  264.  
  265.