Creating Complex Dialogs and Wizards with Dialog Builder
Dialog Builder allows developers to use Microsoft Visual C++ resources to build floating tools, dialog boxes, and wizards for use in Origin. All elements of a resource, including buttons, check boxes, radio buttons, sliders, edit boxes, combo boxes, list boxes, rich edit boxes, and worksheet and graph controls can be programmatically accessed and controlled using the Origin C programming language. Resource operations can be programmed entirely in Origin C.
This book contains a tutorial that uses Microsoft Visual C++, Origin, and the Origin C programming language to construct and launch a resource-only DLL containing a "Hello World" dialog. Additional sections describe in more detail how to create a resource only DLL using Microsoft Visual C++ and how to access your resources in Origin with Origin C. A number of complete Dialog Builder samples that come with Origin are also discussed. All samples discussed in this book can be found in this zip file.
Terms Used in this Book
|A control is an object on a dialog, tabbed dialog, or wizard that gets or displays information, or that performs an action. Common controls include buttons, combo boxes, radio buttons, check boxes, list boxes, and text boxes. (See Microsoft Visual C++ Controls Supported by Dialog Builder for a list of the Visual C++ controls that Dialog Builder supports.)
|A dialog is a window that displays information or that contains controls to obtain information from the user. A dialog can be modal or modeless. When a modal dialog is open the user must close it before they can interact with Origin. A modeless dialog can remain open while the user interacts with Origin. A dialog can contain a placeholder for tabs or for wizard pages. The tabs or wizard pages are actually "sub-dialogs." If a dialog contains a placeholder for tabs or for wizard pages the dialog is referred to as the main dialog. The main dialog can also contain controls in a static area which would then logically apply to all the tabs or to all the wizard pages.
|Procedure File, Temporary Procedure File
|For dialogs and tabbed dialogs, the procedure file (.OPS) is created and written by Origin automatically. For wizards, the procedure file is created if the developer specifies that it be written by calling a Dialog class method. The procedure file provides a set of instructions that is read the next time you open the resource in Origin. These instructions include the types of controls on your resource, the default control settings, and recorded events (such as a button click) from a wizard. As you use your resource in Origin, modified settings and recorded events (such as a button click) are saved to a temporary procedure file (.TOP) which is continually written to, and read from, as you use the resource. After closing the resource, the temporary procedure file (.TOP) is automatically saved as the procedure file (.OPS) for dialogs and for tabbed dialogs, and can be saved as the procedure file (.OPS) for wizards.
|A page (or property page) is contained in a wizard sheet on a wizard and contains controls. Wizards may have two or more pages.
|A Microsoft Visual C++ Picture control placed on a dialog used to position, size, and otherwise contain tabs on a tabbed dialog, pages on a wizard, toolbars, graph controls, worksheet controls, image controls, and custom controls.
|See Tab or Page.
|A placeholder for tabs on a tabbed dialog.
|A tab (property page) is contained in a property sheet on a tabbed dialog and contains controls. Tabbed dialogs may have two or more tabs.
|A tabbed dialog is made up of a main dialog, a property sheet, tabs, and controls.
|A tool is a modeless dialog, often a tabbed dialog.
|A toolbar is made up of a toolbar placeholder and buttons from bitmap files. Buttons perform an action when clicked by running an Origin C function.
|A wizard is made up of a main dialog, a wizard sheet, wizard pages, and controls. A wizard can also contain a wizard map.
|A wizard map helps you navigate through a wizard. The wizard map is displayed on the left side of the wizard. It shows you which wizard page is currently active, as well as which wizard pages have been activated. It also allows you to skip wizard pages in both the forward and backward direction.
|A placeholder for pages on a wizard.
Note:It is also possible to open a resource in Origin created using a resource editor/compiler other than Microsoft Visual C++. See the section Creating and Accessing an Open Watcom Resource-only DLL for a description of how to build a Dialog Builder resource using the Open Watcom C/C++ software and access it in Origin with Origin C.
- Create a Hello World Dialog
Creating A Microsoft Visual C Plus Plus Resource-only DLL
- Getting Started Using the Origin Dialog AppWizard
- Choosing the Project Type for your Dialog
- Choosing the Programming Language to Control your Dialog
- Specifying the Dialog Caption, ID, and Name
- Specifying Tab (Page) Captions, IDs, and Names
- Editing the Microsoft Visual C++ Project Settings
- Opening your Resource and Workspace Files
- Adding Controls to your Dialog, Tabs, or Wizard Pages
- Renaming the Symbol Include Header File
- Resizing Dialog, Tab, and Page Resources
- Microsoft Visual C++ Controls Supported by Dialog Builder
- Setting the Properties of Controls in your Resource
- Setting the TAB Order of Controls on a Dialog, Tab, or Page
- Saving and Building your Resource-only DLL
Additional Resource Topics
Accessing Dialog Builder Resources with Origin C
Creating and Accessing an Open Watcom Resource-only DLL