home *** CD-ROM | disk | FTP | other *** search
- All users of ProtoGen 1.0 should be sure to read #1 below to be sure they
- understand how code regeneration will be performed for their viewprocs.
-
- Tips Tricks and Traps for non-Windows programmers using ProtoGen
-
-
- Contained here is a list of do's and don'ts for those users of ProtoGen
- who may not be completely familiar with the Windows programming
- environment. It should also be used as a guide to experienced Windows
- programmers to avoid problems that may arise in the compiled executable.
-
- If you encounter problems with the code generated by ProtoGen or with
- the execution of the compiled version, you should check this list to see
- if there are such circumstances within your code. While ProtoGen can
- generate a fairly complex application, given the proper input, it is
- neither a compiler nor an enforcer of application design rules and
- consequently it is capable of producing generated source code that
- may not fully meet expectations. If you encounter problems that you
- cannot overcome using these guidelines, you can freely call ProtoView
- Development Co. for technical support.
-
-
- Here then are some basic rules to follow in your use of ProtoGen.
-
- 1. Users of ProtoGen version 1.0 may experience a slight problem with
- code regeneration within viewprocs for dialog modules. This is because
- ProtoGen now generates a regeneration bracket outside and separate from
- the viewproc code for subdialogs. The first time code regeneration is
- performed on a module generated by ProtoGen 1.0 there will be a block of
- code between these regeneration brackets that does not compile
- correctly. You will need to go in to the module itself and remove any
- code you do not want from the bracket and keep any code you do want.
-
- The problem can be avoided completly by either turning off code
- regeneration, or by answering NO to confirm module overwrite messages
- for those screens that do not need code regeneration.
-
- 2. ProtoGen does not perform variable definition checking for field
- names defined under ViewPaint. If the same field name is used in two or
- more screens within the application, then an error may be generated when
- the application is compiled. The same is true for FieldProc names.
- ProtoGen attempts to avoid this problem by prefixing the view name to
- the variable.
-
- Also, do not use a variable name that is identical to either a screen
- name, or a FieldProc name, or a ViewProc name.
-
- In short, be sure that all identifiers are uniquely named in order to
- ensure correct code generation and compilation.
-
- 3. Each screen that is part of a ProtoGen application must be uniquely
- named. Although ProtoGen may be able to distinguish between
- indentically named screens if they are contained in different files,
- Windows will always obtain only the first one encountered in the
- application resources when the program is executed. Therefore, do not
- use the same view more than once in an application.
-
- 4. Do not attach screens created with the SDK Dialog Editor as
- ProtoView screens to an application, and do not attach screens created
- with ViewPaint as Windows dialogs to an application. This choice is
- made on the Dialog Specification Screen in ProtoGen. ProtoGen will
- default to the correct choice according to the extension on the dialog
- resource file. Windows dialogs have an extension of .dlg, while
- ProtoView dialogs have an extension of .pvt. Do not override this
- unless you can deal with the potential consequences.
-
- In particular, to not generate a dialog screen containing buttons with
- the ProtoView styles of BS_OKAY and BS_CANCEL as Windows dialogs. These
- styles are incompatible with the Windows dialog manager and will lead to
- serious problems in the executable.
-
- 5. If you use the Dialog Editor to create a .dlg resource, be sure to
- give the dialog a style of WS_VISIBLE. This will allow the screen to be
- made visible when displayed in the program executable. Otherwise a
- screen may be created but yet it will not be visible, thus creating the
- appearance of a serious problem.
-
- 6. In order for a dialog to be dismissed when an OK or Cancel button is
- clicked during program execution, if must contain buttons with specific
- properties. The specific properties needed depends upon whether the
- screen is a Windows Dialog or a ProtoView screen.
-
- If the screen is a Windows dialog, then it must contain two pushbuttons.
- One must have an ID of IDOK and the other must have an ID of IDCANCEL.
- These IDs are given in the Dialog Editor as part of the header file
- associated with the .dlg file. For more information on specifying these
- IDs consult your SDK manuals on using the Dialog Editor.
-
- If the screen is a ProtoView dialog or view, then it must contain two
- pushbuttons as well. One button must have a style of BS_OKAY and the
- other must have a style of BS_CANCEL. You can either drop these buttons
- in under ViewPaint using the Option: Add OK/Cancel Buttons, or you can
- add the style BS_OKAY and BS_CANCEL to existing buttons and clicking
- on Set.
-
-
-
-