Click here to Skip to main content
15,880,796 members
Articles / Web Development / HTML

Mouse Gestures for Internet Explorer

Rate me:
Please Sign up or sign in to vote.
4.84/5 (99 votes)
21 Sep 200514 min read 1.3M   13.4K   235  
Adding mouse gesture recognition to Internet Explorer.
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently

#pragma once

#ifndef STRICT
#define STRICT
#endif

#ifndef WINVER				// Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0500		// Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif

#ifndef _WIN32_WINNT		// Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0500	// Change this to the appropriate value to target Windows 2000 or later.
#endif						

#ifndef _WIN32_WINDOWS		// Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE			// Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0400	// Change this to the appropriate value to target IE 5.0 or later.
#endif

#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS	// some CString constructors will be explicit

// turns off ATL's hiding of some common and often safely ignored warning messages
#define _ATL_ALL_WARNINGS

#pragma warning( disable: 4100 )    // unreferenced formal parameter
#pragma warning( disable: 4505 )    // unreferenced local function has been removed
#pragma warning( disable: 4199 )    // "IXXX" is not an interface defined in embedded IDL
#pragma warning( disable: 4239 )    // nonstandard extension used : 'argument' : conversion from 'std::auto_ptr<_Ty>' to 'std::auto_ptr<_Ty> &'

#pragma warning( push )
#pragma warning( disable: 4127 )    

#include <atlbase.h>
#include <atlapp.h>
#include <atlcom.h>
#include <atlwin.h>
#include <atltypes.h>
#include <atlctl.h>
#include <atlhost.h>

//
// as we're compiling with the NOMINMAX flag (so we can
// use max from std::numeric_limits), atlctrlw.h can't
// see the min/max macros. Define simple templates at
// global scope to implement them so everybodies happy
//
template< typename T >
T max( T a, T b )
{
    return a > b ? a : b;
}

template< typename T >
T min( T a, T b )
{
    return a < b ? a : b;
}

#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>
#include <atlctrlw.h>
#include <atlctrlx.h>

#include <mshtml.h>

#pragma warning( pop )

#pragma warning( push )
#pragma warning( disable: 4702 )    // unreachable code
#include <list>
#include <map>
#include <vector>
#pragma warning( pop )

using namespace ATL;

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions