|
Public Member Functions |
|
virtual LRESULT | OnCreate () |
| | Called in response to WM_CREATE.
|
| virtual BOOL | OnCommand (WPARAM wParam, LPARAM lParam) |
| | Called in response to WM_COMMAND.
|
| void | Attach (HWND hWnd) |
| | Attaches to existing HWND.
|
|
void | Detach () |
| | Detaches from HWND without destroying the window.
|
| virtual BOOL | OnPaint (HDC hDC) |
| | Called in response to WM_PAINT message.
|
| virtual BOOL | OnEraseBkGnd (HDC hDC) |
| | Called in response to WM_ERASEBKGND message.
|
| void | AutoCenter (BOOL b) |
| | If auto center is enabled, window will center in screen when created.
|
| void | CenterOnParent (BOOL b) |
| | Enable to center window on parent when created.
|
|
void | CenterWindow () |
| | Call to center window properly.
|
|
virtual void | DestroyWindow () |
| | Called in response to WM_DESTROY.
|
|
void | DefaultCREATESTRUCT () |
| | Call to initialize CREATESTRUCT with default values.
|
| BOOL | GetUniqueString (LPSTR buf, DWORD max, LPCTSTR prefix=NULL) |
| | Generates a unique string.
|
|
void | DefaultWNDCLASS () |
| | Initializes WNDCLASS structure to default values.
|
| BOOL | RegisterClass () |
| | Registers the window class.
|
| BOOL | Create (LPCTSTR pTitle) |
| | Creates the window.
|
|
| CWin () |
| | Constructor.
|
|
| ~CWin () |
| | Destructor.
|
|
HINSTANCE | GetInstance () |
| | Returns instance handle.
|
|
HWND | GetSafeHwnd () |
| | Returns window handle.
|
|
HWND | GetParent () |
| | Returns parent window handle.
|
|
BOOL | IsWindow () |
| | Returns non-zero if valid window handle.
|
|
BOOL | IsWnd () |
| | Returns non-zero if valid window handle.
|
| BOOL | ShowWindow (int nCmdShow=SW_SHOWNORMAL) |
| | Sets the windows show state.
|
| BOOL | UpdateWindow () |
| | Sends a WM_PAINT message to window.
|
| BOOL | Invalidate () |
| | Marks the window client area as invalid to invoke a redraw.
|
| BOOL | RedrawWindow (const RECT *pRect=NULL, HRGN hRgn=NULL, UINT uFlags=RDW_ERASE|RDW_INVALIDATE|RDW_ERASENOW|RDW_UPDATENOW|RDW_ALLCHILDREN) |
| | Redraws the window.
|
| BOOL | SetPos (HWND hWnd) |
| | Sets the windows position in the Z-Order.
|
| BOOL | SetPos (int x, int y) |
| | Sets the windows position.
|
| BOOL | SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags) |
| | Sets the window position.
|
| void | SetInstance (HINSTANCE hInst) |
| | Sets the instance handle.
|
| BOOL | SetForegroundWindow () |
| | Sets this window as the foreground window.
|
| virtual HDC | BeginPaint () |
| | Call in response to a WM_PAINT to validate window region.
|
|
ATOM | GetRegisteredClassAtom () |
| | Gets atom registered for class.
|
| virtual LRESULT | OnWindowProc (BOOL bSubclassing, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
| | Called in response to windows message.
|
|
void | UnregisterClass () |
| | Unregisters windows class.
|
|
void | Quit (int nRet=0) |
| | Puts WM_QUIT message into Windows message queue.
|
| virtual BOOL | OnIdle (DWORD dwCalls) |
| | Called during idle periods.
|
| BOOL | DoMessagePump (HWND hWnd=NULL, HACCEL hAccel=NULL) |
| | Pumps messages from Windows message queue.
|
| LRESULT | CallWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam) |
| | Calls previous windows message handler function.
|
|
void | Destroy () |
| | Destroys window and releases resources.
|
| BOOL | UnhookHwnd () |
| | Unhooks any subclassed window.
|
| BOOL | HookHwnd (HWND hWnd) |
| | Subclasses specified window.
|
| virtual BOOL | OnWMMessage (UINT uMsg, WPARAM wParam, LPARAM lParam) |
| | Called when WMMessage is received.
|
Static Public Member Functions |
| static void | CenterWindow (HWND hWnd, HWND hParent=NULL, LPRECT pRect=NULL) |
| | Centers window.
|
| static BOOL | SetPos (HWND hWnd, int x, int y) |
| static BOOL | PumpMessage (HWND hWnd=NULL, HACCEL hAccel=NULL) |
| | Pumps a single message from Windows message queue.
|
| static BOOL | PumpMessages (HWND hWnd=NULL, HACCEL hAccel=NULL) |
| | Pumps all messages from Windows message queue.
|
Public Attributes |
|
WNDCLASS | m_wc |
| | Window class information structure.
|
|
CREATESTRUCT | m_cs |
| | Window create structure information.
|
Protected Attributes |
|
HWND | m_hWnd |
| | Window handle.
|
Basic window encapsulation.