CGD is a Windows dialog creation tool.
 
 
    CGD is a dialog system intended to simplify the development of Windows applications.

    A CGD application has a source file which is two things: the definition of a structured type and a set of commands defining how that record must show up as a dialog. As you can see below, a CGD source file is just the definition of some Pascal types. The tags in blue are remarks for the Pascal compiler, but they are commands for the CGD compiler. The same source file, when compiled by the Pascal compiler, generates an .exe application and, when compiled by CGD, it generates a .cgd dialog file. This file is used by a DLL (called cgdrun20.dll) to edit a record of the type declared as a dialog.

    These dialogs are called codeless because, except for the 57 Kbytes of the library shared by all CGD applications, your application does not require any dialog handling code. Ok, it requires a function call. (10 to 20 bytes.)

    The IDE (Integrated Development Environment) has C to Pascal and Basic to Pascal converters to make development of CGD applications from VisualBasic or C easier.

 

  CGD for the user:
  All dialogs have the same "look and feel", which is as "windowslike" as possible.
  Toolbars, buttons, edit controls, hints, etc. are standard controls.
  All buttons support Windows desktop user preferences.
  Keyboard management: Arrow keys, <Tab>, <Shift>-<Tab>, Right arrow (for expand), Left arrow (for collapse) are the same as in Windows Explorer.
  All dialogs support the clipboard in text mode automatically. You can copy the content of any dialog, paste it into any text editor and save it for later use. You can modify the whole dialog at once by just pasting that text into the dialog again.
  Edit controls support standard Windows copy, cut and paste.
  The whole dialog supports global undoing.
  If the application provides it (it is very easy), the whole dialog may be user configurable, supporting: big fonts, etc. for visually impaired users or just for customization.

The dialog toolbar:  


  CGD for the programmer:
  You get stable, version independent, dialogs without writing a line.
  You can modify (add new properties, etc.) your records without the nightmare of updating their dialog handlers.
  You are forced to structure you data to edit it in dialogs. This is a very clean practice. It is an ideal complement of the modern IDE's code completion features. It may seem somewhat strict at the beginning, but when you get used to it, it becomes natural and the best option.
  Your applications may be very small. Of course, the ideal situation is writing your own window object libraries, but it can also be easily called from component based applications. Check the Visual C and Visual Basic examples supplied.

  Just an example: This application includes window objects, a multiple area interface, a console/browser/editor, an HTML browser including JPEG support, a compiler, a reverse compiler, a C->Pas converter and a Basic->Pas converter in a single .exe file. (Of about 200 Kbytes!)


  CGD is something for you, if:
1.   You like the dialogs.
2.   You understand "low-level" programming issues such as: The size of the variables you use, the use of DLLs and API calls. At least these three and: If you intend to use previewing, GDI. If you intend to use modeless dialogs, Window procedures and message processing.
3.   Your applications are not interface-based. You do not expect to drag-and-drop OLE objects to the dialogs, etc. CGD is specially well suited for CAD, Robotics, Simulation and Scientific applications and for any application handling complex objects with many user-editable properties. Specially, if you add new properties frequently. All applications in this website (www.dybot.com) are CGD applications, download them and decide by yourself.



  CGD is not for you, if:
1.   You do not like the dialogs.
2.   You use programming in languages in which "everything happens automatically". You don't like (or understand) the "details".
3.   Your interfaces are more complex than what can be implemented with CGD, even with callback methods.



   A "Hello world!" program:
PROGRAM HELLO;
USES cgdTypes;

{<STARTDLG CGD20>}
TYPE

{<DIALOG HelloDialog>}



  HelloDialog   = packed record



    {<BLANKLINE>}



    {>My first CGD dialog.} {<LBOLD>}
    {<BLANKLINE>}

    Speed : single; // Note: The variable name is used,
                    // if no other text is given.
    more  : single  {>An other field}



                    {<BLANKLINE>}
  end;
{<ENDDIALOGS>}




VAR aDia : HelloDialog;
BEGIN
    cgdSetCGDFileName('.\hello');
    aDia.speed := 100;
    aDia.more  := 0;
    cgdDialog(0,                    // hWnd of parent
              'My first dialog !',  // Title
              'HelloDialog',        // Type
              SizeOf(HelloDialog),  // Size of data
              @aDia)                // Pointer to data
END.
This is the output of the 
"hello world"  CGD application 
listed to the left:

The file size of this executable is:
3584 bytes (3K5)
It is impossible to write a 32 bit
Windows application smaller than
1024 bytes headers
  512 bytes code
  512 bytes data
  512 bytes .idata
  512 bytes .reloc
   3K = void application



   Bitmaps and conditionals:
{<DIALOG BitmapDemo>}
  BitmapDemo  = packed record
   {<BLANKLINE>}

   {>    This bitmap is NOT conditional}  {<LBOLD>}
   {<CBITMAP 1001>}       {<BITMAPSHIFTX -4>}
   {<BLANKLINE>}
   {>    This bitmap is conditional}   {<LBOLD>}
{<ALIAS Selector>} {\}
   sel1  : (First, Second);  {>Select the} {>>case}

{<CASE Selector = 0>} {\}
   {<CBITMAP 1002>}          {<BITMAPSHIFTX -4>}
{<CASE Selector = 1>} {\}
   {<CBITMAP 1003>}          {<BITMAPSHIFTX -4>}
   {<BLANKLINE>}
   {>    This bitmap is application-owned    } {<LBOLD>}
   {<LBITMAP APPOWNED 1004>} {<BITMAPSHIFTX 6>}
   {<BLANKLINE>}
  end;
{<ENDDIALOGS>}


CGD dialogs also support bitmaps
either as resources or application
owned (=runtime created & freed).


   Configurable options:


   Many visual aspects concerning: fonts, colors,
   width of elements, toolbar buttons, etc. can be
   configured by a call to the function:
       
cgdSetOptions
   The CGD IDE previews such options and it
   converts the results to Pascal source code.
   To learn more of CGD, download it (below) or
   study its manual by clicking here.





 
    This is an actual screenshot of different CGD dialogs:
 

 

MORE


License

  CGD is shareware. One license costs 90 USD. Even if not registered, you can use it with only one limitation as long as you wish:

  If a .cgd file is created with an unregistered CGD copy, the dialog will display a message mentioning this fact in its message output area. It is Ok to use unregistered CGD copies for educational purposes. If you program professionally, you will find your investment in CGD worth the number of working hours it will save.

CGD (c) 2005  -  Jacques Basaldúa.

CGD can be registered HERE.

CGD Help

  If you want to read CGD's manual before downloading, follow this link.

 

D O W N L O A D

This program installs the complete CGD 2006 development toolkit including manuals and examples.
Windows 95, NT4, 98, 2000, Me or XP

(420 Kb)


 

MAIN PAGE

Jacques Basaldúa (c) 2005

CGD page