UBBFriend: Email This Page to Someone!
  Computer Workshop User Forums
  EZGUI Dialog Designers Tutorials
  Code Templates

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Code Templates
Chris Boss
Administrator
posted 02-19-2008 01:24 PM     Click Here to See the Profile for Chris Boss     Edit/Delete Message Reply w/Quote
The Dialog Designer (both Utility and Studio) support Code Templates.

From the Files menu select the "Designer Options" item to display the Configuration Options dialog. You will notice a field for:

"Use Code Template"

The default code template is:

ez40ut.ezt

Code templates are simply text files which have code block tags for different sections of a generated app. You can add code to these sections and they will be added to all projects that use it. It becomes part of the designers generated code.

Here is the default code template. It doesn't have any code to generate, but does have all the sections listed which are currently supported.

code:



Text not within Template Blocks is ignored !

Internal Macros that can be used within a Template Block are:
<<O>> - Add Spaces to offset text
<<T>> - Expand to Spaces based on Tab setting

------------------------------------------------

<<FIRSTLINES>>
<<END>>

------------------------------------------------

<<INCLUDES>>
<<END>>

------------------------------------------------

<<EZINCLUDES>>
<<END>>

------------------------------------------------

<<CONSTANTS>>
<<END>>

------------------------------------------------

<<DECLARES>>
<<END>>

------------------------------------------------

<<GLOBALS>>
<<END>>

------------------------------------------------

<<EZ_MAIN>>
<<END>>

------------------------------------------------

<<LIBRARY>>
<<END>>

------------------------------------------------

**************************************************
The following sections are embedded in a Forms Dialog
Procedure the first time it is created. The code will
not be added to existing Dialog procedures.
DLGPROCV section is for variables and comes first.
DLGPROCWM section is for adding window message
processing code to the Select Case structure.
**************************************************

<<DLGPROCV>>
<<END>>

------------------------------------------------

<<DLGPROCWM>>
<<END>>

------------------------------------------------

****************************************************************
The following sections embed code in the controls Event routine!
They are only generated the first time the event routine is
created. Template code will not be added to existing event
routines.
****************************************************************

<<BUTTON>>
<<END>>

------------------------------------------------

<<PBUTTON>>
<<END>>

------------------------------------------------

<<IBUTTON>>
<<END>>

------------------------------------------------

<<CHECK>>
<<END>>

------------------------------------------------

<<RADIO>>
<<END>>

------------------------------------------------

<<TEXT>>
<<END>>

------------------------------------------------

<<LISTBOX>>
<<END>>

------------------------------------------------

<<COMBOBOX>>
<<END>>

------------------------------------------------

<<SCROLL>>
<<END>>

------------------------------------------------

<<FRAME>>
<<END>>

------------------------------------------------

<<LABEL>>
<<END>>

------------------------------------------------

<<PICTURE>>
<<END>>

------------------------------------------------

<<ICON>>
<<END>>

------------------------------------------------

*******************************************
Canvas is same thing as PB Graphic control!
*******************************************

<<CANVAS>>
<<END>>

------------------------------------------------

<<CUSTOM>>
<<END>>

------------------------------------------------


The code template supports a macro (<<T>> ) for tab spacing so your code will be able to use the current tab spacing setting.

All times are EST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Computer Workshop ( EZGUI ) Home Page

Copyright 2000 to 2007 Christopher R. Boss

Powered by: Ultimate Bulletin Board, Version 5.44
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.