Fetching contributors…
Cannot retrieve contributors at this time
49 lines (40 sloc) 1.66 KB
Original Author: Richard Bateman (taxilian)
Created: Jan 5, 2011
License: Dual license model; choose one of two:
New BSD License
- or -
GNU Lesser General Public License, version 2.1
Copyright 2010 Richard Bateman, Firebreath development team
#pragma once
#ifndef WinMessageWindow_h__
#define WinMessageWindow_h__
#include <boost/noncopyable.hpp>
#include <boost/function.hpp>
namespace FB {
typedef boost::function<bool (HWND, UINT, WPARAM, LPARAM, LRESULT&)> WinProcHandler;
/// @class WinMessageWindow
/// @brief Creates a message window. Don't touch this if you don't understand what you are doing
/// @return The handle of the window.
class WinMessageWindow : boost::noncopyable
static LRESULT CALLBACK _WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
bool DefaultWinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult);
void setWinProc( const WinProcHandler& handler ) { winProc = handler; }
HWND m_hWnd;
WinProcHandler winProc;
#endif // WinMessageWindow_h__