Creating templates for customized dialog boxes

Written by Embarcadero USA on Posted in PROGRAMMING

 Technical Information Database

TI1466C.txt   Creating templates for customized dialog boxes    
Category   :General
Platform    :All
Product    :Borland C++  3.x    

Description:
  Creating Templates for Customizing Common Dialog Boxes
       Creating a custom dialog box is an exciting and significant
  feature that all developers want in their application.  By
  customizing the various parts of the GUI, an application is "set
  apart" from other applications in the market.  In view of this,
  Borland references the capability of customizing common dialog
  boxes in TCWHELP.HLP (load TCWHELP.HLP into WINHELP.EXE and
  search for "custom").  Under the heading "Customizing a Dialog
  Box Template", you will find allusions to several template
  files,the following is a list:
  Template filename   Corresponding dialog box
  COLOR.DLG           Color
  FILEOPEN.DLG        Open (single selection)
  FILEOPEN.DLG        Open (multiple selection)
  FINDTEXT.DLG        Find
  FINDTEXT.DLG        Replace
  FONT.DLG            Font
  PRNSETUP.DLG        Print
  PRNSETUP.DLG        Print Setup
       There are duplicate .DLG files, but each file effectuates
  distinct attributes as noted.  These files do not exist as
  separate dialog templates shipped with BC++/TC++.  Due to this,
  many users have been confused by the following statement in our
  TCWHELP.HLP file:
       "...A developer should create a custom dialog box template
  by modifying the appropriate dialog box template in
  COMMDLG.DLL..."
       The purpose of this technical document is to provide a
  solution to the dilemma of the missing templates.  By using
  Resource Workshop (WORKSHOP.EXE) any developer will be able to
  create these templates themselves.  The steps that follow will
  guide the developer through the construction of templates for
  customizing common dialogs.
  Steps:
  1.   Load RW (Resource Workshop).
  2.   Select File | Open project...
  3.   Change the file type to DLL library.
  4.   Change directories to WINDOWS\SYSTEM.
  5.   Select COMMDLG.DLL and choose OK.
  6.   In the child-window titled "commondlg.dll" scroll down to
       the section labeled "DIALOG".
  7.   Select "CHOOSECOLOR", and RW will display that dialog.
  8.   Choose Resource | Save resource as...
  9.   Change the File type to DLG resource script.
  10.  Choose the name for the file (remember the name of the
       templates in the help file TCWHELP.HLP).
  11.  Close the "CHOOSECOLOR" dialog.
  12.  Select the rest of the dialog resources located in
       COMMONDLG.DLL and follow the previous steps for each dialog.
       Now you have a complete set of templates to modify according
  to your applications needs and your design.  In order to properly
  use the customized dialogs created with the templates, please
  read the entry for "Customizing Common Dialog Boxes" in it's
  entirety.
  DISCLAIMER: You have the right to use this technical information
  subject to the terms of the No-Nonsense License Statement that
  you received with the Borland product to which this information
  pertains.


Reference:


7/2/98 10:39:45 AM
 


Article originally contributed by Borland Staff

Tags: C++Builder



Check out more tips and tricks in this development video: