#include <w32dlib/window.h>
Inheritance diagram for W32DLib::Window:

Public Member Functions | |
| Window () | |
| Constructor. | |
| virtual | ~Window () |
| Destructor. | |
| bool | HasMutex () |
| Whether the Window() constructor could create a mutex. | |
| HWND | GetHWND () |
| Returns the HWND for the window. | |
| HMENU | GetHMENU () |
| Returns the HMENU associated with this window. | |
| bool | SetHMENU (HMENU menu) |
| Sets the HMENU associated with this window. | |
| bool | Move (int x, int y, int width, int height, bool repaint=true) |
| Sets a Window's position and size. | |
| bool | MoveBase (Window *w, int x, int y, int width, int height, bool repaint=true) |
| Sets a Window's position and size using Dialog base units. | |
| LRESULT | SendMsg (UINT msg, WPARAM wp, LPARAM lp) |
| Send a message to the window. | |
| void | SetText (const char *text) |
| Sets the window text. | |
| void | SetText (const std::string &text) |
| Sets the window text. | |
| std::string | GetText () |
| Gets the window text. | |
| void | Enable (bool enable) |
| Enables or disables the window. | |
Protected Member Functions | |
| virtual BOOL | InstanceProc (HWND wnd, UINT msg, WPARAM wp, LPARAM lp) |
| Handles windows messages. | |
Static Protected Member Functions | |
| static BOOL CALLBACK | WindowProc (HWND wnd, UINT msg, WPARAM wp, LPARAM lp) |
| The base WindProc. | |
Protected Attributes | |
| HWND | m_wnd |
| The window handle for this window. | |
|
|
Constructor.
|
|
|
Destructor.
|
|
|
Enables or disables the window. This call will only work while the window is on display. The behaviour is undefined if it is called at any other time.
Reimplemented in W32DLib::Dialog. |
|
|
Returns the HMENU associated with this window. This call will only work while the window is on display. The behaviour is undefined if it is called at any other time. |
|
|
Returns the HWND for the window. This call will only work while the window is on display. The behaviour is undefined if it is called at any other time. |
|
|
Gets the window text. This call will only work while the window is on display. The behaviour is undefined if it is called at any other time.
|
|
|
Whether the Window() constructor could create a mutex. Window will create a mutex when constructed to ensure that behaviour is correct if there are multiple threads in the application with their own windows (note that none of the classes are thread-safe in themselves -- two threads cannot share a Window instance). As I'm not overly fond of exceptions, this call means you can detect whether this worked or not if your program requires it. It also means that single-threaded applications aren't stopped by the failure to create a mutex.
|
|
||||||||||||||||||||
|
Handles windows messages. If the window handles messages (like Dialog), then this must be overwridden so that Window::WindowProc will pass on the messages. If the message has not been handled, or is WM_DESTROY, then the base version should be called. Note that the reason it should be called for WM_DESTROY is so that the internal mapping of windows to Window class instances can be tidied up.
Reimplemented in W32DLib::Dialog. |
|
||||||||||||||||||||||||
|
Sets a Window's position and size.
|
|
||||||||||||||||||||||||||||
|
Sets a Window's position and size using Dialog base units.
|
|
||||||||||||||||
|
Send a message to the window. This call will only work while the window is on display. The behaviour is undefined if it is called at any other time.
|
|
|
Sets the HMENU associated with this window. This call will only work while the window is on display. The behaviour is undefined if it is called at any other time.
|
|
|
Sets the window text. This call will only work while the window is on display. The behaviour is undefined if it is called at any other time.
|
|
|
Sets the window text. This call will only work while the window is on display. The behaviour is undefined if it is called at any other time.
|
|
||||||||||||||||||||
|
The base WindProc. This is the WindProc/DialogProc that should be used. Note that it expects a pointer to a Window in lp when called with WM_INITDIALOG or WM_CREATE.
|
|
|
The window handle for this window. The base Window::InstanceProc will set this from the wnd parameter for WM_INITDIALOG or WM_CREATE. Other derived classes should set the window as appropriate (for instance controls from GetDlgItem()). |
1.4.1