Jim Fawcett CSE775 – Distributed Objects Spring 2007

Slides:



Advertisements
Similar presentations
Ch. 6 Web Page Design – Absolute Positioning, Image Maps, and Navigation Bars Mr. Ursone.
Advertisements

CGS 1060 Introduction to MicroComputer Usage Chapter 1 Windows 7
Basic OOP Concepts and Terms
Server Architecture Models Operating Systems Hebrew University Spring 2004.
MaskEdit Control The MaskEdit Control is an ActiveX Control that is a specialised version of a TextBox. MaskEdit’s allow for validation of input by ensuring.
JAVA BEANS By Madhuri Kakumanu. What is a Java Bean? “ A Java Bean is a reusable software component that can be visually manipulated in builder tools.”
CIS 338: Creating ActiveX Controls Dr. Ralph D. Westfall March, 2003.
Bertrand Bellenot ROOT Users Workshop Mar ROOT GUI Builder Status & Plans ROOT & External GUI World MFC, FOX, Qt, PVSS… Snapshot of the Future.
Presented by Joel Solomon.  Create an Image Collage  Create Several Image Slides  Link Slides with Action Buttons  Use Jeopardy Templates.
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
OLE / COM Helia / Martti Laiho Sources: MSDN Kraig Brockschmidt: Inside OLE Orfali-Harkey-Erwards: Client/Server Survival Guide.
COMCOM omponent bject odel After this presentation, you will: Be Able To: Conceptual understanding of COM How it works, What it’s used for Decode Acronyms.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 13 – Graphical User Interfaces Part 2 Outline.
Introduction to Windows Programming
1 Chapter 28 Networking. 2 Objectives F To comprehend socket-based communication in Java (§28.2). F To understand client/server computing (§28.2). F To.
Developing Great Dashlets Will Abson About Me Project Lead, Share Extras Alfresco Developer and previously Solutions Engineer DevCon 2011 –
Chapter 29 World Wide Web & Browsing World Wide Web (WWW) is a distributed hypermedia (hypertext & graphics) on-line repository of information that users.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
Windows Forms in Visual Studio 2005: An in-depth look at key features Name: Joe Stegman Title: Lead Program Manager Session code.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
Chapter 7 Controls. 2 Introduction (1/4) Control –Special kind of window –Designed to convey information to the user or to acquire input –Reduce the tedium.
How to Submit a Work Request to Engineering & Facilities This is a PowerPoint Slide Show. To advance to the next slide, left click your mouse, or use the.
Application software- programs that let you do things What are some computer programs that you or your parents use on the computer?
The Chain of Responsibility Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Collaboration diagrams. Deployment diagrams. Lesson 4.
COM Connection Points 主講人:虞台文. Content The Client-Object-Sink Relationship IConnectionPointContainer & IConnectionPoint Implementation using ATL/COM.
Developing Great Dashlets Will Abson About Me Project Lead, Share Extras Alfresco Developer and previously Solutions Engineer DevCon 2011 –
1 Developing for Test Automation and Accessibility Using Programmatic Access to the UI Thomas Logan FUN307 Program Manager Microsoft Corporation.
Developing Great Dashlets Will Abson About Me Project Lead, Share Extras Alfresco Developer and previously Solutions Engineer DevCon 2011 –
Section 10.1 Define scripting
Jim Fawcett CSE686 – Internet Programming Spring 2014
Introduction to Windows Programming
Windows Programming Environments
Copyright © Jim Fawcett Spring 2017
Mediator Design Pattern
Jim Fawcett CSE775 – Distributed Objects Spring 2004
Putting the Distributed into COM
Event Loops and GUI Intro2CS – weeks
Jim Fawcett CSE686 – Internet Programming Spring 2012
Jim Fawcett CSE775 - Distributed Objects Spring 2016
Apartments and COM Threading Models
Message-Passing Communication Analyzer By Poonam Bijlani CSE 775- Distributed Objects Prof. Jim Fawcett.
Inheritance Allows extension and reuse of existing code
ActiveX Control Recipe
Jim Fawcett CSE791 – Distributed Objects Spring 2001
Parent Portion of the Student Profile
Web Software Model CS 4640 Programming Languages for Web Applications
COM components + persistent storage = objects
Out-of-Process Components
C# COM Interoperability Late Binding
Working with Dialogs and Controls
Jim Fawcett CSE775 – Distributed Objects Spring 2003
Jim Fawcett CSE775 – Distributed Objects Spring 2011
Jim Fawcett CSE686 – Internet Programming Summer 2008
Introduction to Internet Programming
Event Driven Programming
How It All Fits Together
Jim Fawcett CSE776 – Design Patterns Summer 2003
COMMON CONTROLS A control is a child window that an application uses in conjunction with another window to enable user interaction. Controls are most often.
Back end Development CS Programming Languages for Web Applications
Basic OOP Concepts and Terms
Out-of-Process Components
Active Template Library
Lecture 7 ATL and Out-of-Process Components
Jim Fawcett CSE775 – Distributed Objects Spring 2007
Automation and IDispatch
Jim Fawcett CSE687 – Object Oriented Design Spring 2014
Jim Fawcett CSE791 – Distributed Objects Spring 2002
Back end Development CS Programming Languages for Web Applications
Shared Memory David Ferry, Chris Gill
Presentation transcript:

Jim Fawcett CSE775 – Distributed Objects Spring 2007 ActiveX Controls Jim Fawcett CSE775 – Distributed Objects Spring 2007

What is an ActiveX Control? Com Component A COM component User Interface Has thread affinity, must live in an STA Derives from CComObjectRootEx<CComSingleThread-Model> Creatable class Derives from CComCoClass Provides IClassFactory interface

What is an ActiveX Control? Properties, callbacks, change notifications Has stock and custom properties and methods Implements IDispatch interface Stock and custom event callbacks Supports connection points dispinterface, IConnectionPointContainer, IConnectionPoint, IProvideClassInfo2 Property change notifications IPropertyNotifySink, connection points

What is an ActiveX Control? Control behavior On-demand rendering of view IViewObject, IViewObject2, IViewObjectEx Standard control behavior IOleControl In-place activation IOleObject, IOleInPlaceActiveObject

What is an ActiveX Control? Persistence and Drag-and-Drop Persistence support for containers IPersistStreamInit, IPersistPropertyBag, IPersistStorage Drag and Drop support IDataObject, IDropSource, IDropTarget

What is an ActiveX Control? Design-Time Support Provide property pages ISpecifyPropertyPages Property browsing from container IPerPropertyBrowsing Arrange properties by category ICategorizeProperties

Control Types “Standard” ActiveX control Composite Control A container and a control HTML Control Uses same webBrowser control as IE

What is a Control Container? Provides a window Acts as parent for the child COM control Provides means for user to communicate with control, e.g., button-click, mouse-move, … Support a set of COM interfaces that control uses to communicate with container

What is a Control Container? Basic containment Control creation CAxHostWindow has the base classes CComCoClass CComObjectRootEx<CComSingleThreadModel> CWindowImpl IOleClientSite IOleInPlaceSiteWindowless IOleControlSite IOleContainer IObjectWintSiteImpl IServiceProvider IAdviseSink

Container Window Since the container provides a window for the control, you can do all the usual window things with it by sending windows messages: Resize and move Show and hide CAxWindow provides a QueryControl method to obtain the control’s interface HRESULT QueryControl(REFIID iid, void** ppUnk);

Sinking a Control’s Events Connection Pointer interfaces dispinterface, not dual interface, so container can’t just derive from, and implement those source interfaces IDispatchImpl<nID, T, pdiid> Derive once of each control Uses BEGIN_SINK_MAP, SINK_ENTRY, END_SINK_MAP Call IConnectionPointContainer, IConnectionPoint, IAdvise to establish link Uses HRESULT AtlAdviseSinkMap(T* pT, bool bAdvise);

Sinking Control’s Property Notifications Control defines IPropertyNotify interface Request permission to change a property Notify of a property change IPropertyNotify is a dual interface Container just inherits and implements No need for sink map and IDispatchImpl Implement STDMETHODIMP OnRequestEdit(DISPID dispID) { return S_OK; } STDMETHODIMP OnChanged(DISPID dispID) { m.bDirty = true; return S_OK; }