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

📄 dlgdsn.doc

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







  As an example, suppose (for a TStaticText entry) you enter 'This is a line 
  of text.'  Dialog Design will generate code which looks like:

   Control := New(PStaticText,
       Init(R, 'This is a line of text.'));      {for Pascal}
   control = new TStaticText(TRect(8, 3, 25, 4),
       "This is a line of text.");               //for C++

  But if you enter '@theText', you'll get code which looks like:

   Control := New(PStaticText,
       Init(R, theText));                 {for Pascal}
   control = new TStaticText(
       TRect(8, 5, 23, 6), theText);      //for C++

  where 'theText' presumably refers to a string defined elsewhere.


  Options Button

  Most of the Add/Edit dialogs have an Options button.  This button brings up  
  another dialog which will let you change the default ofXXXX and evXXXX flag 
  and mask bits.  In most cases, you'll want to stick with the defaults but 
  some bits do have interesting uses.  In particular, the ofFramed bit can be 
  used for framing controls.  Also, with a little effort, you can frame 
  groups of controls or divide the dialog into panes.  The context sensitive 
  help (F1) for the options dialog has some hints on this.

  Extras Button

  Many of the Add/Edit dialogs also have an Extras button.  This button 
  brings up a dialog where you can add parameters or other information about 
  non-standard controls (controls that you have derived).  This information 
  is only of use if you are customizing your own conversion programs.

  Help Context

  Many of the Add/Edit dialogs have fields labeled Help Context and Value.  
  By default, these contain hcNoContext and 0.  Dialog Design uses the help 
  context symbol when generating source code and the value when producing a 
  resource.

  For small projects, it may be convenient just to enter this information by 
  hand.  However, if you're using Borland's demo help compiler, TVHC, Dialog 
  Design can work with the help definition file it produces.  To do this, 
  choose Load Help Ctx file from the Options menu and supply the filename of 
  the help definition file.  Then clicking on the '*' box next to the help 
  context field (or typing '*' in the field) will bring up a pick list of the 
  definitions from which to choose.

  You can also automatically load your help definition file at startup by 


                                      6







  entering the information in the Configuration dialog (Options/Configuration 
  on the menu).

  During the various iterations of writing a help file, the numerical values 
  associated with the help symbols are often changed.  However, once a help 
  context symbol has been entered for a control, Dialog Design will keep its 
  associated help value current.  Updating occurs whenever:

       A .DLG file is already loaded and a help context file is loaded
    or
       A help context file has been loaded and a new .DLG file is loaded.


  Reading Pascal TDialog Resources  (Operations/Load Pascal Resource File)

  You can read Pascal (not C++, unfortunately) TDialog resources from 
  compatible resource files generated by Dialog Design or other design 
  programs such as Blaise' Turbo Vision Development Toolkit(tm).  You'll be 
  asked for the resource filename and then given a list of resource ID's from 
  which to choose.

  Dialog Design will read only TDialog resources with controls that it 
  supports.  In the read process, the following conversions are made:

     TListViewer to TListBox
     TParamText  to TStaticText
     TView       to TStaticText (with no text)

  Note:  You should always save your design in .DLG files.  Storing them as 
  resources and reading them as resources will result in loss of information.


  CONVERSION PROGRAMS AND SOURCE CODE

  In this version of Dialog Design, all source code and resource generation 
  is done by external conversion programs.  When you select one of the source 
  code options from the menu, the following process occurs:

    1. A temporary ASCII script file is written to disk.
    2. The appropriate conversion program is called with parameters telling 
       it the script filename, the output filename, and an error filename.
    3. The conversion program produces the desired conversion from script 
       file to source code (or resource), or possibly returns error messages.
    4. Dialog Design displays any error messages and deletes the temporary 
       files.

  The above process is largely transparent to the user but because it uses 
  external programs, it allows for user customization of these programs.  
  (Customization is covered in separate documentation.)

  Here's a summary of the conversion programs supplied with Dialog Design:



                                      7







    PasSrc1, CppSrc1

    The source output for these two programs is similar (except for the 
    language, of course) and closely resembles the source generated by 
    previous versions of Dialog Design.  Source is in the form of a function 
    (MakeDialog/makeDialog) which defines the dialog and returns a pointer to 
    it.  A data record/structure is also defined to assist in transferring 
    data into and out of the dialog.  The generated source code may be 
    included in the files TestCase.Pas/TestCase.Cpp (at the line of 
    asterisks) to form a test program for the dialog.

    PasSrc2

    Output from PasSrc2 is in the form of a Pascal unit with the dialog 
    object being defined in the Interface section and the actual dialog 
    construction done in the dialog's constructor.  This form is probably 
    more suitable for dialogs which require overridden methods such as 
    HandleEvent.  PasSrc2 uses an auxiliary (ASCII) file, Skel.Dat, to layout 
    the unit structure.  When using PasSrc2, you should change the default 
    PDialog pointer name as you're really defining a TDialog descendent.

    CppSrc2

    CppSrc2 produces a module and header file for a TDialog descendent with 
    the dialog construction done in the constructor.  This form is probably 
    more suitable for dialogs which require overridden methods such as 
    handleEvent.  CppSrc2 uses an auxiliary (ASCII) file, CppSkel.Dat, to 
    layout the file structure.  Be sure and change the dialog's class name 
    from TDialog to something appropriate for your new class.

    The file generated by CppSrc2 contains a line "cut here" where it can be 
    divided to form a .h and a .cpp file.

    PasRsrc, CppRsrc

    These files generate Pascal and C++ TDialog resources.  Resources can be 
    added to an existing resource or EXE file, or a new resource file 
    started.  You will be asked to enter a resource ID string (case sensitive 
    and must not contain spaces).  Any existing resource or EXE file will be 
    renamed with a .BKP extension, copied, and the resource added to the 
    copy.  If the ID corresponds to an existing resource, that resource will 
    be deleted.

    User

    A Space where you may include your own program.








                                      8







  COPYRIGHT AND REGISTRATION

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

  Dialog Design may be copied and distributed freely (including uploading it 
  to bulletin boards), providing:

    1. No fee is charged and it is not part of a package for which a charge 
       is made.
    2. The package is not modified in any way.

  If you do upload this package to a bulletin board,  I'd appreciate it if 
  you would make an attempt to keep the upload current.

  If you use Dialog Design professionally (to assist in program creation for 
  your employer or for sale) please send $30 along with your registration to 
  the appropriate address listed below.  Registration entitles you to a free 
  update to the most recent version or an update to the next release.  No 
  usage fee is required for hobbyists, students, beginners, occasional users, 
  etc.

  Please report any problems, suggestions, etc.  Contact me on Compuserve or 
  Internet (the best way) or at one of the addresses below.

  Dave Baldwin
  CompuServe ID #76327,53.
  Internet address: 76327.53@compuserve.com


  ACKNOWLEDGEMENTS

  Help file modifications from Peter Brandstrom's TVTOYS.ZIP.





















                                      9







                                 REGISTRATION


        Name: __________________________________________________________

        Telephone: ________________________CompuServe ID:_______________

        Address: _______________________________________________________

        Address: _______________________________________________________

        City: __________________________________________________________

        State/Country:______________________ Postal Code: ______________


        Present Dialog Design Version:___________Pascal/C++:____________


  Bugs, Problems, Comments: ____________________________________________

     ___________________________________________________________________

     ___________________________________________________________________

     ___________________________________________________________________

     ___________________________________________________________________

     ___________________________________________________________________

     ___________________________________________________________________

     ___________________________________________________________________


  Professional users:  Please send along with $30 to:

  David Baldwin,
  22 Fox Den Rd.,
  Hollis, NH 03049        (Approx May 15 to Oct 15)
  (603) 465-7857

  David Baldwin,
  144 13th St. East,
  Tierra Verde, FL 33715  (Approx Oct 15 to May 15)
  (813) 867-3030

  Since mail is forwarded, either address may be used.





                                     10


⌨️ 快捷键说明

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