|
#pragma once
#include "Smartptr.h"
namespace GE_{namespace Utils{
// this calss installs a WH_CALLWNDPROC hook, chaining the instances,
// and calling the virtual OnHook. You can derive and specialize OnHook as needed
// always allocate on heap and manage with strong poiters
class CWndProcHook;
typedef Safe::PtrStrong<CWndProcHook> PWndProcHook;
class CWndProcHook: public Safe::ObjStrong
{
private:
LPVOID _token;
public:
static LRESULT Call(LPVOID token);
LRESULT Default();
bool Clear();
CWndProcHook();
virtual ~CWndProcHook(void);
protected:
virtual LRESULT OnHook(CWPSTRUCT& cwps);
};
}}
|
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.
Born and living in Milan (Italy), I'm an engineer in electronics actually working in the ICT department of an important oil/gas & energy company as responsible for planning and engineering of ICT infrastructures.
Interested in programming since the '70s, today I still define architectures for the ICT, deploying dedicated specific client application for engineering purposes, working with C++, MFC, STL, and recently also C# and D.