⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlgdsn.doc

📁 BORLAND公司C语言对话框开发程序
💻 DOC
📖 第 1 页 / 共 2 页
字号:







                                                          January 9, 1994

                                 Dialog Design

                  A Dialogbox Design Program for Turbo Vision

                                  Version 4.1

                   (C) Copyright 1990-4 by L. David Baldwin.  
                             All Rights Reserved.

  Further copyright information given below.


  OVERVIEW

  Dialog Design takes some of the pain out of designing dialog boxes for 
  Borland's Turbo Vision package.  With Dialog Design, dialog controls can be 
  easily added, edited, rearranged, and the dialog itself sized, moved, etc.  
  Once the design is satisfactory, Dialog Design can produce source code to 
  be included in your program or a resource file for use by your program.  
  Both the Pascal and C++ languages are supported.


  REQUIREMENTS

    Borland (R) Pascal version 7.0 (Turbo Vision 2.0)
      and/or
    Borland C++ version 3.1  (Turbo Vision 1.0)
       (Dialog Design version 2.x supports Turbo Pascal 6.0)
    Some familiarity with the Turbo Vision package
    VGA Monitor
    A mouse is desirable



  GETTING STARTED

  Dialog Design uses a number of external conversion programs to generate 
  source code and resources for the two languages supported.  If you have 
  downloaded this package, the executables of the conversion programs may not 
  have been included to save download time.  If not, you will first have to 
  compile and link the source before you can do anything meaningful.  See the 
  accompanying READ.ME file for information on how to do this.

  When first starting Dialog Design, a Configuration Information dialog will 
  come up.  Enter your preliminary configuration here, in particular the 
  language you will be using.  The default names for the conversion files 
  will already be listed but you should probably add the complete path to 
  these names unless they will always be in the default directory.




                                      1







  On leaving the this dialog, you will be given the opportunity to save the 
  configuration.  Once saved, you won't have to fill it out each time you 
  start the program.  However, you can change the configuration at any time 
  using the Options/Configuration menu selection.


  A NOTE TO C++ USERS

  C++ currently only supports Turbo Vision 1.0.  Many of the entry dialogs in 
  Dialog Design show Turbo Vision 2.0 options.  However, in C++ mode, these 
  options will be grayed or otherwise made inaccessible.


  DESIGNING A DIALOG BOX

  Dialog Design has three modes of operation:

    Design Mode

    Dialog Design begins in design mode and this is the mode that you use for 
    all layout work and editing.  In design mode, the dialog doesn't look or 
    act quite like it will in the final design.  Here's some of the 
    differences:

       A 'canvas' background is used to better delineate the actual space 
       occupied by each control.

       Controls are colored red when selected.

       Multiple controls may be selected.

       All controls may be selected even those not normally selectable.

    Try Mode

    Try mode is entered using the F9 key.  In try mode, the dialog behaves as 
    it's supposed to.  You can check the Tab order, make temporary entries, 
    and push buttons to actually check how things will work.  Exit try mode 
    with the escape key or click on the close box.

    Ordering Mode

    Ordering mode allows you to change the Tab order of your dialog controls.  
    The method for doing this is discussed further below.  The F8 key toggles 
    you into and out of ordering mode.

  While there is no fixed way to design a dialog, here's one suggested 
  sequence:

  1.In design mode, work with the dialogbox large enough so that you won't be 
    crowded. 



                                      2







  2.From the Add menu, select a control to add.  This will bring up a dialog
    where you can enter the necessary information.  Use the online help (F1 
    key) if you have a question as to what goes in a particular field.  When 
    the OK button is pushed, the control will appear in the lower right corner 
    of the design box.  The control is then positioned by dragging it with the 
    mouse, or by using the arrow keys (Shift+arrow moves a little faster).  
    Work in the upper left corner of the box.

    A faster way to add controls is to use the Toolbox.  See Toolbox below 
    for more details.

  3.Continue adding controls as desired.  At any time, controls can be 
    repositioned or sized with the mouse (further details below).  If 
    something other than position or size needs changing, select the control 
    and from the Edit menu choose Edit Selected (or use F7).  This will bring 
    up its dialogbox for changes.

  4.When all the controls have been added and positioned, size the box to fit 
    and move it to the desired location on the desktop.  Be sure and add a 
    title (Edit Dialog from the Edit menu).

  5.Enter Try Mode with the F9 key and test the dialog.  Be sure to check how 
    the controls sequence using the Tab key.  Exit Try mode with Esc or click 
    on the close box.

  6.If the Tab sequence needs changing, use F8 to enter ordering mode.  With 
    the mouse, click on each control to establish the desired order.   Exit 
    back to design mode with F8.

    Changing the sequence without a mouse is a little more complicated.  Use 
    the Tab key to select (highlight) the next control to be sequenced.  Then 
    press the Enter key to enter the selected control into the sequence.  
    After all controls have been entered, exit back to design mode with F8.

    Some controls (such as Static Text, and Labels) don't enter into the 
    tab sequence of a dialogbox.  You can order these if it's convenient, but 
    the order won't effect the final results.  

    Be sure to recheck the tab order in Try mode.

  7.This is a good time to save your work.  Choose Save or Save As from the 
    File menu to create or update a .DLG file.  Any file with the same name 
    will be renamed with a .BKP extension.

  8.You can preview the source code to be generated by choosing one of the 
    Write Source selections from the Operations menu, and then choosing the 
    Screen button.  The code will appear in a viewer window.

  9.To create source code for your dialogbox, choose one of the Write Source 
    selections from the Operations menu and then choose the File button.  See 
    the section below on Conversion Programs for a discussion of the source 
    code generated.


                                      3








  10.To generate a resource file or add the new dialogbox to an existing 
    resource or EXE file, choose Write Resource from the Operation menu.  
    Both a filename and a resource ID name will be requested.  If the file 
    already exists, it will be renamed with a .BKP extension.  If the 
    existing file is a resource or EXE file, it will be copied, and the new 
    resource added to the copy.  Any existing resource with the same ID will 
    be deleted.  Note that the resource ID name is case sensitive.


  SELECTING, CLICKING, DRAGGING, SIZING, ETC.

  To select a control, click and release on it with the left button or use the 
  Tab key.

  To select multiple controls, select the first, then hold down the shift key 
  while clicking on the others.  Note that, in this mode, clicking toggles 
  selection on and off so it's possible to deselect as well as select.

  You can also select a block of controls by using the mouse to define an 
  enclosing rectangle.  Position the mouse to one corner of the desired 
  rectangle (the start position must not be on a control).  Hold the left 
  button down and drag to the opposite corner of the rectangle before 
  releasing the button.  During the drag operation, a shaded area will show 
  the rectangle.  Those controls completely enclosed by the rectangle 
  will be selected.  If the shift key is held down during this operation, any 
  previously selected controls will remain selected.

  To select all controls, use the F4 key.

  To move controls, select the controls to be moved, then click on any one of 
  them and, without releasing the button, drag the group to the desired 
  position.  The group may also be moved using the arrow keys.

  To resize a control, first select it then click and drag on its lower right 
  corner.  Note that some controls only size in one dimension and all have a 
  minimum size.

  To edit a control, click it with the right button.  Or select it with the 
  Tab key and press F7.  Either way brings up the control's Add/Edit dialog.

  To edit the dialog itself, click on the caption line with the right button.  
  Or use the the Edit/Dialog menu selection.


  TOOLBOX

  The toolbox provides a quick method for adding controls to the dialogbox.  
  If the toolbox isn't visible, toggle it on with Ctrl-F6.  The toolbox may 
  be repositioned by dragging its caption bar.

  To add a control using the toolbox, click and release on the appropriate 


                                      4







  icon with the left button.  The control will pop off the toolbox and follow 
  the mouse.  When you reach the desired location, click once more to drop 
  the control.  At this point, the mouse will be properly positioned to size 
  the control.

  If you pick up a control from the toolbox and then decide not to use it, 
  drop it outside of the dialog or move the mouse off screen.

  From top to bottom, left to right, the control icons are:

    TInputLine         TStaticText
    TInputLong         TButton
    TCheckbox          TListBox
    TRadioButton       TScrollbar (Vertical)
    TMemo              TScrollbar (Horizontal)                                  
                                                                                
  TLabel and TMultiCheckBox have no representation in the toolbox.                       
                                                                                
  Once you've added controls from the toolbox, you'll need to edit them to 
  supply further information.                                           
                                                                                
  SOME DETAILS

  Command Line

  The command line used to load Dialog Design is:

    DLGDSN [<dialog filename>]

  The optional dialog filename specifies the name of a design file to be 
  loaded.  If no extension is given, '.DLG' is assumed.


  Duplicating Controls

  Sometimes it is desirable to make a series of similar controls as might be 
  found in a column of TInputLines, for instance.

  Controls may be duplicated by holding down the control key and left 
  clicking with the mouse.  A copy of the control will appear directly below 
  the copied control.

  You can also duplicate a control by selecting it and using the Edit|Copy 
  Control menu command.


  @ Operator for Text Entry

  The '@' operator may be used almost anywhere text input is required to 
  indicate a variable reference is desired rather than a quoted string.  To 
  indicate a variable reference, just enter '@' as the first character 
  following it with the variable name.


                                      5


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -