soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SAxContainer Class Reference

Implementation of an ActiveX container. More...

#include <SAxContainer.h>

Inheritance diagram for SAxContainer:
MinimumIDispatchImpl ActiveXSite< SAxContainer >

Public Member Functions

 SAxContainer ()
 Constructor for SAxContainer.
 
virtual ~SAxContainer ()
 Destructor for SAxContainer.
 
BOOL CreateControl (REFGUID guid, DWORD dwClsCtx=CLSCTX_INPROC_SERVER)
 Create an ActiveX control.
 
STDMETHOD EnumObjects (DWORD, IEnumUnknown **)
 Enumerate objects in the container.
 
STDMETHOD LockContainer (BOOL)
 Lock or unlock the container.
 
STDMETHOD ParseDisplayName (IBindCtx *, LPOLESTR, ULONG *, IMoniker **)
 Parse a display name into a moniker.
 
STDMETHOD CreateMoniker (LPOLESTR szName, IBindCtx *pBC, IMoniker **ppmk, DWORD dwReserved)
 Create a moniker from a display name.
 
STDMETHOD MonikerBindToStorage (IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC, REFIID riid, void **ppvObj)
 Bind a moniker to a storage object.
 
STDMETHOD MonikerBindToObject (IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC, REFIID riid, void **ppvObj)
 Bind a moniker to an object.
 
STDMETHOD QueryService (REFGUID guidService, REFIID riid, void **ppvObject)
 Query for a service.
 
STDMETHOD QueryInterface (REFIID iid, void **object)
 Query for an interface.
 
ULONG AddRef ()
 Increment the reference count.
 
ULONG Release ()
 Decrement the reference count.
 
- Public Member Functions inherited from MinimumIDispatchImpl
STDMETHOD GetTypeInfoCount (UINT *pctinfo)
 
STDMETHOD GetTypeInfo (UINT, LCID, ITypeInfo **)
 
STDMETHOD GetIDsOfNames (REFIID, LPOLESTR *, UINT, LCID, DISPID *)
 
STDMETHOD Invoke (DISPID, REFIID, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *)
 
- Public Member Functions inherited from ActiveXSite< SAxContainer >
 ActiveXSite ()
 Constructor for ActiveXSite.
 
virtual ~ActiveXSite ()
 Destructor for ActiveXSite.
 
void SetAxHost (IAxHostDelegate *pAxHost)
 Set the delegate for ActiveX host operations.
 
void SetExternalUIHandler (IDocHostUIHandler *pUiHandler)
 Set the external UI handler for the ActiveX control.
 
IUnknown * GetActiveXControl ()
 Get the ActiveX control.
 
void Init (IUnknown *pControl)
 Initialize the ActiveX control.
 
void Clear ()
 Clear the ActiveX control and release resources.
 
HRESULT InitControl (IStream *pStream=NULL)
 Initialize the ActiveX control from a stream.
 
HRESULT ActivateAx (IStream *pStream=NULL)
 Activate the ActiveX control.
 
bool HitTest (const POINT &pt) const
 Check if a point is within the ActiveX control.
 
bool InsideClippingRegion (const RECT &rcClip) const
 Check if the control intersects with a clipping region.
 
HRESULT DoVerb (long verb)
 Perform a verb on the ActiveX control.
 
LRESULT Draw (HDC hDC, LPCRECT lpClipRect)
 Draw the ActiveX control.
 
HRESULT FireAmbientPropertyChange (DISPID dispChanged)
 Fire an ambient property change notification.
 
LRESULT OnWindowMessage (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handle a window message for the ActiveX control.
 
STDMETHOD QueryInterface2 (REFIID iid, void **object)
 Query for an interface.
 
STDMETHOD SaveObject (void)
 Save the object.
 
STDMETHOD GetMoniker (DWORD, DWORD dwWhichMoniker, IMoniker **ppmk)
 Get the moniker for the object.
 
STDMETHOD GetContainer (IOleContainer **ppContainer)
 Get the container for the object.
 
STDMETHOD ShowObject (void)
 Show the object.
 
STDMETHOD OnShowWindow (BOOL fShow)
 Notify the container of a show window event.
 
STDMETHOD RequestNewObjectLayout (void)
 Request a new object layout.
 
STDMETHOD OnControlInfoChanged (void)
 Notify the control that its info has changed.
 
STDMETHOD LockInPlaceActive (BOOL)
 Lock the control in place active state.
 
STDMETHOD GetExtendedControl (IDispatch **)
 Get the extended control.
 
STDMETHOD TransformCoords (POINTL *, POINTF *, DWORD)
 Transform coordinates between container and control.
 
STDMETHOD TranslateAccelerator (MSG *, DWORD)
 Translate an accelerator key.
 
STDMETHOD OnFocus (BOOL fGotFocus)
 Notify the control of focus change.
 
STDMETHOD ShowPropertyFrame (void)
 Show the property frame for the control.
 
STDMETHOD CanWindowlessActivate (void)
 Check if the control supports windowless activation.
 
STDMETHOD GetCapture (void)
 Check if the control currently has the mouse capture.
 
STDMETHOD SetCapture (BOOL fCapture)
 Set or release the mouse capture for the control.
 
STDMETHOD GetFocus (void)
 Check if the control currently has focus.
 
STDMETHOD SetFocus (BOOL fFocus)
 Set or release focus for the control.
 
STDMETHOD GetDC (LPCRECT pRect, DWORD grfFlags, HDC *phDC)
 Get a device context for the control.
 
STDMETHOD ReleaseDC (HDC hDC)
 Release a previously obtained device context.
 
STDMETHOD InvalidateRect (LPCRECT pRect, BOOL fErase)
 Invalidate a rectangle of the control.
 
STDMETHOD InvalidateRgn (HRGN, BOOL fErase)
 Invalidate a region of the control.
 
STDMETHOD ScrollRect (INT, INT, LPCRECT, LPCRECT)
 Scroll a rectangle of the control.
 
STDMETHOD AdjustRect (LPRECT)
 Adjust a rectangle for the control.
 
STDMETHOD OnDefWindowMessage (UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
 Handle a default window message for the control.
 
STDMETHOD OnInPlaceActivateEx (BOOL *pfNoRedraw, DWORD dwFlags)
 Activate the control in-place with extended options.
 
STDMETHOD OnInPlaceDeactivateEx (BOOL)
 Deactivate the control in-place with extended options.
 
STDMETHOD RequestUIActivate (void)
 Request UI activation for the control.
 
STDMETHOD CanInPlaceActivate (void)
 Check if the control can be activated in-place.
 
STDMETHOD OnInPlaceActivate (void)
 Activate the control in-place.
 
STDMETHOD OnUIActivate (void)
 Activate the control's user interface.
 
STDMETHOD GetWindowContext (IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
 Get the window context for the control.
 
STDMETHOD Scroll (SIZE)
 Scroll the control.
 
STDMETHOD OnUIDeactivate (BOOL)
 Deactivate the control's user interface.
 
STDMETHOD OnInPlaceDeactivate (void)
 Deactivate the control in-place.
 
STDMETHOD DiscardUndoState (void)
 Discard the undo state of the control.
 
STDMETHOD DeactivateAndUndo (void)
 Deactivate and undo the control.
 
STDMETHOD OnPosRectChange (LPCRECT lprcPosRect)
 Handle a change in the position rectangle of the control.
 
STDMETHOD GetWindow (HWND *phwnd)
 Get the window handle for the control.
 
STDMETHOD ContextSensitiveHelp (BOOL)
 Handle context-sensitive help for the control.
 
void OnDataChange (FORMATETC *, STGMEDIUM *)
 Handle a change in data.
 
void OnViewChange (DWORD, LONG)
 Handle a change in view.
 
void OnRename (IMoniker *)
 Handle a rename of the object.
 
void OnSave (void)
 Handle a save operation.
 
void OnClose (void)
 Handle a close operation.
 

Additional Inherited Members

- Protected Member Functions inherited from ActiveXSite< SAxContainer >
HRESULT SetExtent (int width, int height)
 Set the extent (size) of the control.
 
HRESULT DoInplaceActivate ()
 Perform in-place activation of the control.
 

Detailed Description

Implementation of an ActiveX container.

This class implements the necessary interfaces to host ActiveX controls, including IOleContainer, IBindHost, IServiceProvider, and ActiveXSite.

Definition at line 1013 of file SAxContainer.h.

Member Function Documentation

◆ AddRef()

ULONG SAxContainer::AddRef ( )

Increment the reference count.

Returns
New reference count.

◆ CreateControl()

BOOL SAxContainer::CreateControl ( REFGUID guid,
DWORD dwClsCtx = CLSCTX_INPROC_SERVER )

Create an ActiveX control.

Parameters
guidCLSID of the control to create.
dwClsCtxContext in which the control is to be run.
Returns
TRUE if successful, FALSE otherwise.

◆ CreateMoniker()

STDMETHOD SAxContainer::CreateMoniker ( LPOLESTR szName,
IBindCtx * pBC,
IMoniker ** ppmk,
DWORD dwReserved )

Create a moniker from a display name.

Parameters
szNameDisplay name.
pBCBind context.
ppmkPointer to the IMoniker interface pointer.
dwReservedReserved.
Returns
HRESULT indicating success or failure.

◆ EnumObjects()

STDMETHOD SAxContainer::EnumObjects ( DWORD ,
IEnumUnknown **  )
inline

Enumerate objects in the container.

Parameters
grfFlagsFlags indicating what objects to enumerate.
ppenumPointer to the IEnumUnknown interface pointer.
Returns
HRESULT indicating success or failure.

Definition at line 1047 of file SAxContainer.h.

◆ LockContainer()

STDMETHOD SAxContainer::LockContainer ( BOOL )
inline

Lock or unlock the container.

Parameters
fLockTRUE to lock the container, FALSE to unlock.
Returns
HRESULT indicating success or failure.

Definition at line 1057 of file SAxContainer.h.

◆ MonikerBindToObject()

STDMETHOD SAxContainer::MonikerBindToObject ( IMoniker * pMk,
IBindCtx * pBC,
IBindStatusCallback * pBSC,
REFIID riid,
void ** ppvObj )

Bind a moniker to an object.

Parameters
pMkMoniker.
pBCBind context.
pBSCBind status callback.
riidInterface identifier.
ppvObjPointer to the interface pointer.
Returns
HRESULT indicating success or failure.

◆ MonikerBindToStorage()

STDMETHOD SAxContainer::MonikerBindToStorage ( IMoniker * pMk,
IBindCtx * pBC,
IBindStatusCallback * pBSC,
REFIID riid,
void ** ppvObj )

Bind a moniker to a storage object.

Parameters
pMkMoniker.
pBCBind context.
pBSCBind status callback.
riidInterface identifier.
ppvObjPointer to the interface pointer.
Returns
HRESULT indicating success or failure.

◆ ParseDisplayName()

STDMETHOD SAxContainer::ParseDisplayName ( IBindCtx * ,
LPOLESTR ,
ULONG * ,
IMoniker **  )
inline

Parse a display name into a moniker.

Parameters
pbcBind context.
pszDisplayNameDisplay name to parse.
pchEatenNumber of characters parsed.
ppmkOutPointer to the IMoniker interface pointer.
Returns
HRESULT indicating success or failure.

Definition at line 1072 of file SAxContainer.h.

◆ QueryInterface()

STDMETHOD SAxContainer::QueryInterface ( REFIID iid,
void ** object )

Query for an interface.

Parameters
iidInterface identifier.
objectPointer to the interface pointer.
Returns
HRESULT indicating success or failure.

◆ QueryService()

STDMETHOD SAxContainer::QueryService ( REFGUID guidService,
REFIID riid,
void ** ppvObject )

Query for a service.

Parameters
guidServiceService identifier.
riidInterface identifier.
ppvObjectPointer to the interface pointer.
Returns
HRESULT indicating success or failure.

◆ Release()

ULONG SAxContainer::Release ( )

Decrement the reference count.

Returns
New reference count.

The documentation for this class was generated from the following file: