Darc Library  2012.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
darc::Window Class Reference

Wrapper class for window management (Windows OS). More...

#include <dc_window.h>

List of all members.

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

Detailed Description

Wrapper class for window management (Windows OS).


Member Typedef Documentation

typedef void(* darc::Window::PFNCALLBACK)(HWND, UInt, WPARAM, LPARAM)

Constructor & Destructor Documentation

darc::Window::Window ( ) [inline]
darc::Window::~Window ( ) [inline]

Member Function Documentation

Destroys window instance. Calls DestroyWindow() and UnregisterClass().

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.

Parameters:
_widthWidth of this window.
_heightHeight of this window.
_titleUnique title of this window.
_hIconHandle to an icon. Can be NULL.
Returns:
DC_OK on success, DC_NOTAVAILABLE if window is already initialized or DC_ERROR if something went wrong.
bool darc::Window::IsActive ( ) [inline]

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.


The documentation for this class was generated from the following files: