Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

ATL/AUX Library

, 17 Mar 2000
A set of VC++ helpers and patterns to help automate some routine coding tasks.
atlaux.zip
Shared
ax_id.zip
ax_idgen.zip
ieclient.zip
IEClient
IEClient.dsw
IEClient.dsp
Release
IEClient.exe
////////////////////////////////////////////////////////////////////////////////
// DWebBrowserEvents2Sink
// Copyright (c) by Andrew Nosenko (andien@geocities.com), 1998
// http://www.geocities.com/~andien/atlaux.htm

// Depends on CSinkImpl<> defined in AtlAux.h

class ATL_NO_VTABLE DWebBrowserEvents2Sink: 
  public CSinkImpl<DWebBrowserEvents2Sink, &DIID_DWebBrowserEvents2, &LIBID_SHDocVw> 
{
  // Lay out vtable with all event handlers in DWebBrowserEvents2 order.
  // Then you may override selected ones in the derived class.

  STDMETHOD_(void, StatusTextChange)(BSTR Text) {}
  STDMETHOD_(void, ProgressChange)(long Progress, long ProgressMax) {}
  STDMETHOD_(void, CommandStateChange)(long Command, VARIANT_BOOL Enable) {}
  STDMETHOD_(void, DownloadBegin)() {}
  STDMETHOD_(void, DownloadComplete)() {}
  STDMETHOD_(void, TitleChange)(BSTR Text) {}
  STDMETHOD_(void, PropertyChange)(BSTR szProperty) {}
  STDMETHOD_(void, BeforeNavigate2)(IDispatch* pDisp,
    VARIANT * URL, VARIANT * Flags, VARIANT * TargetFrameName, VARIANT * PostData, VARIANT * Headers,
    VARIANT_BOOL * Cancel) {}
  STDMETHOD_(void, NewWindow2)(IDispatch** ppDisp, VARIANT_BOOL * Cancel) {}
  STDMETHOD_(void, NavigateComplete2)(IDispatch* pDisp, VARIANT * URL ) {}
  STDMETHOD_(void, DocumentComplete)(IDispatch* pDisp, VARIANT * URL ) {}
  STDMETHOD_(void, OnQuit)() {}
  STDMETHOD_(void, OnVisible)(VARIANT_BOOL Visible) {}
  STDMETHOD_(void, OnToolBar)(VARIANT_BOOL ToolBar) {}
  STDMETHOD_(void, OnMenuBar)(VARIANT_BOOL MenuBar) {}
  STDMETHOD_(void, OnStatusBar)(VARIANT_BOOL StatusBar) {}
  STDMETHOD_(void, OnFullScreen)(VARIANT_BOOL FullScreen) {}
  STDMETHOD_(void, OnTheaterMode)(VARIANT_BOOL TheaterMode) {}
/*
  // alternatively, specify and lay out the v-table
  // only for selected events
  // (but comment out the above 'bulk' definitions)

  AUX_BEGIN_EVENT_MAP()
    AUX_EVENT_ID(DISPID_ONQUIT) // by DISPID
    AUX_EVENT_NAME(OnVisible) // by name
    AUX_EVENT_NAME(StatusTextChange)
  AUX_END_EVENT_MAP()

  STDMETHOD_(void, OnQuit)() {}
  STDMETHOD_(void, OnVisible)(VARIANT_BOOL Visible) {}
  STDMETHOD_(void, StatusTextChange)(BSTR Text) {}
*/
};

// RegExps: 
// \[[^\[]+\]\(\:b+\)*
// void \(\:i\) -> STDMETHOD_(void, \1)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Andrew Nosenko
Engineer
Australia Australia
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140922.1 | Last Updated 18 Mar 2000
Article Copyright 2000 by Andrew Nosenko
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid