Darc Library
2012.11
|
Wrapper class for window management (Windows OS). More...
#include <dc_window.h>
Public Types | |
typedef void(* | PFNCALLBACK )(HWND, UInt, WPARAM, LPARAM) |
Public Member Functions | |
Window () | |
DCR | Init (UInt _width, UInt _height, const char *_title, const HICON _hIcon, HMODULE _hModule) |
Creates a window instance. | |
void | RegisterWinProc (PFNCALLBACK _f) |
This registers a user defined windows callback function. | |
~Window () | |
DCR | Destroy () |
HWND | GetWindowHandle () |
bool | IsActive () |
UInt | GetMousePositionX () const |
UInt | GetMousePositionY () const |
Wrapper class for window management (Windows OS).
typedef void(* darc::Window::PFNCALLBACK)(HWND, UInt, WPARAM, LPARAM) |
darc::Window::Window | ( | ) | [inline] |
darc::Window::~Window | ( | ) | [inline] |
Destroys window instance. Calls DestroyWindow() and UnregisterClass().
UInt darc::Window::GetMousePositionX | ( | ) | const [inline] |
UInt darc::Window::GetMousePositionY | ( | ) | const [inline] |
HWND darc::Window::GetWindowHandle | ( | ) | [inline] |
darc::DCR darc::Window::Init | ( | UInt | _width, |
UInt | _height, | ||
const char * | _title, | ||
const HICON | _hIcon, | ||
HMODULE | _hModule | ||
) |
Creates a window instance.
_width | Width of this window. |
_height | Height of this window. |
_title | Unique title of this window. |
_hIcon | Handle to an icon. Can be NULL. |
bool darc::Window::IsActive | ( | ) | [inline] |
void darc::Window::RegisterWinProc | ( | PFNCALLBACK | _f | ) |
This registers a user defined windows callback function.
Note that this call replaces the built-in version so make sure you re-implement everything necessary.