ICONICS ActiveX ToolWorX V 6.1.

Slides:



Advertisements
Similar presentations
The Web Warrior Guide to Web Design Technologies
Advertisements

About Links in Dreamweaver. Creating Links A link has 2 parts: –The URL (Uniform Resource Locator)= the name and path of the file you want to link –The.
© by Pearson Education, Inc. All Rights Reserved.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
ASP.NET Programming with C# and SQL Server First Edition
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
® IBM Software Group © 2006 IBM Corporation JSF Tab Controls This Learning Module shows how to develop server-side EGL applications with dynamic content.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
A First Program Using C#
MVC pattern and implementation in java
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
Java Beans.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
CIS 338: Creating ActiveX Controls Dr. Ralph D. Westfall March, 2003.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
An Object-Oriented Approach to Programming Logic and Design
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
Model View Controller (MVC) Rick Mercer with a wide variety of others 1.
Using Visual Basic 6.0 to Create Web-Based Database Applications
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Chapter 8: Writing Graphical User Interfaces
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
‘Tirgul’ # 7 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #7.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
AUTOMATION OF WEB-FORM CREATION - KINNERA ANGADI – MS FINAL DEFENSE GUIDANCE BY – DR. DANIEL ANDRESEN.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 12 - Graphical User Interface Concepts: Part.
Key Applications Module Lesson 21 — Access Essentials
Creating Buttons – Lesson 51 Creating Buttons Lesson 5.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
BZUPAGES.COM Visual Programming Lecture – 6- 7 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
About These Slides This slide set is designed to be used with the OMA sample application It is recommended you follow the steps outlined in the “Preparing.
Forms Using. 2  Plan a form  Create a form  Move and resize controls  Modify labels  Modify text boxes Objectives.
Version 6.0 Cutler Hammer Advanced Graphics Featuring….
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Microsoft Access 2002 Illustrated Complete Forms Using.
Microsoft Visual Basic 2008 CHAPTER ELEVEN Multiple Classes and Inheritance.
Tutorial 3 Adding and Formatting Text with CSS Styles.
BlackBerry Applications using Microsoft Visual Studio and Database Handling.
XP Tutorial 7 Creating a Flash Web Site. XP New Perspectives on Macromedia Flash 82 Objectives Plan and create a Flash Web site Create a Flash template.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
® IBM Software Group © 2007 IBM Corporation Module 1: Getting Started with Rational Software Architect Essentials of Modeling with IBM Rational Software.
Wednesday NI Vision Sessions
Dive Into® Visual Basic 2010 Express
Document/View Architecture
Working in the Forms Developer Environment
Introduction to Visual Basic 2008 Programming
Chapter 2 – Introduction to the Visual Studio .NET IDE
1. Introduction to Visual Basic
VISUAL BASIC.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Web Development Using ASP .NET
Presentation transcript:

ICONICS ActiveX ToolWorX V 6.1

AGENDA Introduction & Overview Demonstration: GWXGauge ActiveX Toolkit Architecture Programming Techniques Demonstration: Creating a New ActiveX Control with ActiveX ToolWorX

Introduction/Overview Part 1 Introduction/Overview

Recommended Knowledge Visual C++ 6.0 MFC Microsoft Developer’s Studio OLE Automation Win 32 Building ActiveX controls with MFC

ActiveX Controls Component/modular software design Can be embedded into any ActiveX container Visual Basic Forms HTML pages for Internet Explorer ICONICS’ GraphWorX32 HMI Application Your own custom built container Methods, Properties, and Events Usually In-process

ActiveX ToolWorX A development toolkit for easy creation of OPC (OLE for Process Control) enabled ActiveX controls Featuring OPC Connectivity Powerful Animation Capabilities Built-in UI controls (sliders, buttons, etc.)

OPC Connectivity Easy support for connection to OPC servers Automatically handles OPC data updates (reads and writes); just provide a tag name, the toolkit takes care of the rest. OPC Tag Browser included for tag name selection user interface

Powerful Animation Includes all the animation capabilities of ICONICS’ GraphWorX32 HMI product Compose images with rectangles, lines, ellipses, text, bitmaps, and more... Transform images: Size, Location, Rotation, Color, and more... Updates are fast and flicker-free

Built-in UI Controls Toolkit includes handling of User Input controls Sliders and dials for writing analog values Numeric/text entry fields Buttons for downloading/toggling values No need to worry about handling mouse clicks, mouse moves, or keystrokes for these input controls; the toolkit takes care of it.

Origins of ActiveX ToolWorX Toolkit was created by ICONICS to assist in development of ICONICS component ActiveXs Leverages functionality developed by ICONICS for GraphWorX32 HMI Application Resulting toolkit is “general purpose” (useful to developers other than ICONICS).

Advantages of Using ActiveX ToolWorX Rapid development because there is no need to implement features already supported by the toolkit (OPC connectivity, animation, UI controls, etc.) Permits focus on component-specific functionality (build desired “intelligence” into your component) Don’t even need to understand OPC (the toolkit abstracts it)

What is Included in the Toolkit? ICONICS ActiveX ToolWorX Wizard Automatically generates the framework source code for developing ActiveX controls using ActiveX ToolWorX ActiveX ToolWorX Developer’s Guide Documentation Detailed instructions on how to use the toolkit Explanation of the toolkit’s architecture GraphWorX32 OLE Automation Reference

What is Included in the Toolkit? GwxExtDll.DLL Dynamic link library containing HMI functionality (more on this later) olexpress.DLL Contains OPC related functionality (this DLL is used by GwxExtDll; you will not need to use this DLL directly) TagBrowser.DLL OPC tag browser

What is Included in the Toolkit? Gwx32.TLB Type library for OLE Automation supported by GwxExtDll GWXGauge ActiveX Example ActiveX control created using the toolkit Source code of GWXGauge A valuable resource for understanding how to create controls using the toolkit Other miscellaneous support files

GWXGauge GWXGauge is an OPC enabled ActiveX control developed with ActiveX ToolWorX Gauge has over 100 properties making it a highly flexible component Source code for the gauge included in the toolkit demonstrates a wide variety of programming techniques that can be used with the toolkit

Part 2 Architecture

GwxExtDll.DLL Significant portions of ICONICS’ GraphWorX32 HMI product have been encapsulated in this DLL This DLL is an MFC Extension DLL The extention DLL exports a single class CGwxControl (a COleControl derived class). Your new controls are derived off of CGwxControl (instead of COleControl), thus inheriting all of the functionality in GwxExtDll GwxExtDLL exposes a rich set of OLE automation properties/methods for manipulating the base control

ActiveX Toolkit Architecture ActiveX Container Application Instances of your ActiveX Controls ActiveX “A” Code ActiveX “B” Code OLE Automation OLE Automation GwxExtDll.DLL Code GwxExtDll Data GwxExtDll Data OPC Data OPC Data OPC Data OPC Server OLExpress FrameWorX

ActiveX ToolWorX Wizard The released version of the toolkit will include a wizard for automatically generating framework source code for developing ActiveX controls using ActiveX ToolWorX To help understand the toolkit better, the tasks automated by the wizard are described in the ActiveX ToolWorX documentation

Tasks Performed by the Wizard Create a new Visual C++ project using Microsoft’s MFC ActiveX Control Wizard In Build-Settings-Link-Release add GwxExtDll.LIB In Build-Settings-Link-Debug add GwxExtDlld.LIB When you are building a debug version of your ActiveX, you need to use the debug version of GwxExtDll to ensure that the ActiveX registers properly

Tasks Performed by the Wizard Change your control class to be derived from CGwxControl instead of COleControl Replace all instance of COleControl in your control class (.cpp and .h file) Include Control.h in the .cpp files of your control class and application class Control.h is the class definition file for CGwxControl

Tasks Performed by the Wizard Replace the default drawing code in OnDraw() to: CGwxControl::OnDraw(pdc, rcBounds, rcInvalid) This allows the base class, CGwxControl, to do all the drawing In InitInstance(), just before returning, add the following code: InitialGraphWorXExtensionDll(); This function insures the MFC properly handles the current module state

Tasks Performed by the Wizard Inherit desired properties and methods of the base class by modifying the ODL file of your project Copy the properties/methods you want from GWXview32.ODL (file provided in the toolkit) Modify the ID numbers such that the first bit of the hi-word is set

Tasks Performed by the Wizard Using Class Wizard, add a new class by importing the GwxDisplay object type from Gwx32.TLB This provides easy access to exposed methods/properties of GwxExtDll To use the new class (IGwx32) add a new member variable to your control class. Initialize the variable as follows: LPDISPATCH lpDispatch = GetDisplay(); m_lpDispatch = new IGwx32(lpDispatch); Delete this member in the destructor of your control class

Tasks Performed by the Wizard Optionally override default settings of the base control’s properties in the constructor of your control class The following example would turn on the scrollbars by default in your derived control: m_verticalScrollbar = TRUE; m_horizontalScrollbar = TRUE;

Programming Techniques Part 3 Programming Techniques

Programming Tasks Create GraphWorX32 objects which make up the control Create lines, rectangles, dynamic transformations, etc. that define the look and behavior of your ActiveX Manipulate existing GraphWorX32 objects in the control Associate properties of your ActiveX control with properties of the lines, rectangles, dynamic transformations, etc. that comprise your control.

Creating Objects There are two primary techniques you can use to create GraphWorX32 objects with the toolkit Dynamic programmatic creation of objects via OLE automation Loading a pre-created set of objects created visually using GraphWorX32 HMI application

Programmatic Creation Use OLE automation methods defined in Gwx32.TLB to create the GraphWorX32 objects, based on the current values of your ActiveX’s properties Use methods such as CreateRectangle() and CreateSizeDynamic() to build up the visual appearance and behavior of your ActiveX

Visual Creation Create the objects for your ActiveX visually using GraphWorX32 Bind the resulting display file directly into your ActiveX resources Load the display from the resource area via FileOpen() method

Programmatic vs. Visual Creation Programmatic Creation is highly flexible but more difficult to program Layout of objects is unrestricted, but logic for intelligent layout can be tricky This is the technique used by GWXGauge Visual Creation is very easy to program, but tends to be less flexible Layout of objects is done visually, but this layout is generally fixed Can include bitmaps in the layout This technique is good for controls which are visually complex, but tend not to vary much in their appearance

Example: Programmatic Creation To create a resizing bar m_lpDispatch->CreateRectangle(l,t,w,h,filled,fillColor,lineColor, lineWidth,lineStyle,shadow,shadowColor,edgeStyle,hidden, ”bar1”,rounded)->Release(); LPDISPATCH lpDisp = m_lpDispatch->CreateSizeDynamic(“bar1”,”size1”, sizeType,clip,startSize,endSize); IGwxDynamic sizeDispDrv(lpDisp); sizeDispDrv.SetDataSource(dataSource); sizeDispDrv.SetRangeOverride(rangeOverride); if (rangeOverride) { sizeDispDrv.SetLowRange(lowRange); sizeDispDrv.SetHighRange(highRange); } Don’t forget to release dispatch pointers

Example: Creation by FileOpen() First, visually create the control’s display using GraphWorX32 Import the display into your project via Insert/Resource/Custom Specify the resource type as “GWX32_DISPLAY” Store the resource id of the display as a string name (for instance, “GWX32_MYCONTROL1”) Load the display from the resource area using FileOpen() method, passing the file name in the special format: “LoadDisplayFromResource:string representation of module handle:resource name string”

Example: Creation by FileOpen() Sample Code: HINSTANCE hModule = AfxGetResourceHandle(); CString strModuleHandle; strModuleHandle.Format(_T("%ld"),(long)hModule); CString strDisplayName(_T("LoadDisplayFromResource:")); strDisplayName += strModuleHandle; strDisplayName += _T(":GWX32_MYCONTROL1"); m_lpDispatch->FileOpen(strDisplayName); Note: you can bind more than one display file into your ActiveX, loading any one of those displays based on property value

Handling Property Changes When a property of your ActiveX changes, you need to update the object(s) affected by that property Get the dispatch pointer of the appropriate object, given the object’s name (the name of an object is specified when the object is first created). Example: changing the data source LPDISPATCH lpDisp = m_lpDispatch->GetDynamicObjectFromName(objName); if (lpDisp != NULL) { IGwxDynamic lpDispDrv(lpDisp); lpDispDrv.SetDataSource(newDataSource); }

Creating a new ActiveX Control with ActiveX ToolWorX Demonstration Creating a new ActiveX Control with ActiveX ToolWorX

Summary ICONICS’ ActiveX ToolWorX allows you to rapidly develop OPC enabled ActiveX controls with fast, flicker-free animation, and user input capabilities Components made with ActiveX ToolWorX can be embedded into any ActiveX container