FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
WinMessageWindow.h
1 /**********************************************************\
2 Original Author: Richard Bateman (taxilian)
3 
4 Created: Jan 5, 2011
5 License: Dual license model; choose one of two:
6  New BSD License
7  http://www.opensource.org/licenses/bsd-license.php
8  - or -
9  GNU Lesser General Public License, version 2.1
10  http://www.gnu.org/licenses/lgpl-2.1.html
11 
12 Copyright 2010 Richard Bateman, Firebreath development team
13 \**********************************************************/
14 #pragma once
15 #ifndef WinMessageWindow_h__
16 #define WinMessageWindow_h__
17 
18 #include <boost/noncopyable.hpp>
19 #include <boost/function.hpp>
20 
21 namespace FB {
22  typedef boost::function<bool (HWND, UINT, WPARAM, LPARAM, LRESULT&)> WinProcHandler;
23 
31  class WinMessageWindow : boost::noncopyable
32  {
33  public:
36 
37  HWND getHWND();
38 
39  static LRESULT CALLBACK _WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
40  bool DefaultWinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult);
41  void setWinProc( const WinProcHandler& handler ) { winProc = handler; }
42  private:
43  HWND m_hWnd;
44  WinProcHandler winProc;
45  };
46 }
47 #endif // WinMessageWindow_h__
48 
Creates a message window. Don't touch this if you don't understand what you are doing.