Click here to Skip to main content
15,860,859 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.2M   13.4K   235  
Adding mouse gesture recognition to Internet Explorer.
///////////////////////////////////////////////////////////////
//
// KeyboardHook.h
//
// Created: rhare - 21/07/2005
// Copyright (c) 2005 Ralph Hare (ralph.hare@ysgyfarnog.co.uk)
// All rights reserved.
//
// The code and information is provided "as-is" without
// warranty of any kind, either expressed or implied.
//
///////////////////////////////////////////////////////////////

#ifndef __KEYBOARDHOOK_H_15173C39_10ED_40AF_828B_B1B57CB3C2C6_
#define __KEYBOARDHOOK_H_15173C39_10ED_40AF_828B_B1B57CB3C2C6_

#include "WindowHook.h"

/**
 * Class to hook low-level keyboard events - Note: keyboard
 * events aren't specific to any thread
 **/
class KeyboardHook : public WindowHook
{
public:
    KeyboardHook();
    ~KeyboardHook();

    struct Observer
    {
        virtual ~Observer() {};
        virtual LRESULT OnKeyHook( UINT uMsg, const KBDLLHOOKSTRUCT *pks ) = 0;
    };

    void Initialise( Observer *pObserver );
    void Shutdown();

// WindowHook
private:
    LRESULT OnHook( int code, WPARAM wParam, LPARAM lParam );

private:
    Observer    *m_pObserver;
};

#endif // __KEYBOARDHOOK_H_15173C39_10ED_40AF_828B_B1B57CB3C2C6_

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