Category:Creating Complex Dialogs and Wizards with Dialog Builder

From OriginLab Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 06:15, 20 May 2009 (edit)
Irisbai (Talk | contribs)

← Previous diff
Revision as of 06:28, 2 December 2009 (edit) (undo)
Echo (Talk | contribs)

Next diff →
Line 2: Line 2:
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 OriginPro are also discussed. All samples discussed in this book can be found in the \Samples\DeveloperKit\Dialog Builder subfolder of OriginPro. 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 OriginPro are also discussed. All samples discussed in this book can be found in the \Samples\DeveloperKit\Dialog Builder subfolder of OriginPro.
 +
 +<tip>
 +The samples of Developer Kit are available in an Origin Package file (.OPX) from Origin 8.1. Please follow the instructions below for installation:
 +# Download the file: ftp://ftp.originlab.com/pub/USERS/O81DevKitSamples.opx
 +# Open Origin and drag the opx file onto Origin window
 +When the OPX is installed, all samples discussed in this book can be found in the \Samples\DeveloperKit\ subfolder
 +
 +</tip>
<br>'''Terms Used in this Book''' <br>'''Terms Used in this Book'''
{| style="x-cell-content-align: top; width: 700px; margin-left: 0.25in; margin-right: 0.25in; margin-top: 0.25in; margin-bottom: 0.25in; border-left-style: Double; border-left-width: 4px; border-right-style: Double; border-right-width: 4px; border-top-style: Double; border-top-width: 4px; border-bottom-style: Double; border-bottom-width: 4px; border-spacing: 0px; border-spacing: 0px" width="700" {| style="x-cell-content-align: top; width: 700px; margin-left: 0.25in; margin-right: 0.25in; margin-top: 0.25in; margin-bottom: 0.25in; border-left-style: Double; border-left-width: 4px; border-right-style: Double; border-right-width: 4px; border-top-style: Double; border-top-width: 4px; border-bottom-style: Double; border-bottom-width: 4px; border-spacing: 0px; border-spacing: 0px" width="700"

Revision as of 06:28, 2 December 2009

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 OriginPro are also discussed. All samples discussed in this book can be found in the \Samples\DeveloperKit\Dialog Builder subfolder of OriginPro.

Image:Tip_icon.png

The samples of Developer Kit are available in an Origin Package file (.OPX) from Origin 8.1. Please follow the instructions below for installation:

  1. Download the file: ftp://ftp.originlab.com/pub/USERS/O81DevKitSamples.opx
  2. Open Origin and drag the opx file onto Origin window

When the OPX is installed, all samples discussed in this book can be found in the \Samples\DeveloperKit\ subfolder



Terms Used in this Book

Term

Description

Control

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.)

Dialog

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.

Page

A page (or property page) is contained in a wizard sheet on a wizard and contains controls. Wizards may have two or more pages.

Placeholder

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.

Property Page

See Tab or Page.

Property Sheet

A placeholder for tabs on a tabbed dialog.

Tab

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.

Tabbed Dialog

A tabbed dialog is made up of a main dialog, a property sheet, tabs, and controls.

Tool

A tool is a modeless dialog, often a tabbed dialog.

Toolbar

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.

Wizard

A wizard is made up of a main dialog, a wizard sheet, wizard pages, and controls. A wizard can also contain a wizard map.

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.

Wizard Sheet

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.