List of all members.
Class that manages a message handling function attched to a win32 HWND.
Definition at line 30 of file windows_message_handler.hpp.
Member Typedef Documentation
|typedef boost::function<LRESULT (HWND window, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC next_proc)> callback_t
Function prototype for the message handling function.
|window||HWND that received the message |
|message||win32 message sent to the window |
|wparam||wparam argument sent with the message |
|lparam||lparam argument sent with the message |
|next_proc||the next WNDPROC in the handler chain; can be invoked with CallWindowProc to chain to the next handler |
- LRESULT to be returned from the WNDPROC.
Definition at line 43 of file windows_message_handler.hpp.
Constructor & Destructor Documentation
Member Function Documentation
|| window )
Attach the message handler to the window with a specific string handle. A given string handle can be attached to a window at most once, attempting to re-install a handler with the same string handle on a given window is an error. Attempting to install a message handler to two windows at the same time is an error.
Note that the ProcName template argument is a const char*, which requires a very specific coding style to be used by clients. The string being passed must be staticly defined, but cannot be a string literal, as the following example demonstrates:
extern const char my_proc_name_k = "my-unique-proc-name";
message_handler_t handler(&my_handler_func); handler.install<my_proc_name_k>(my_hwnd);
Definition at line 66 of file windows_message_handler.hpp.