|
W32DLib
|
The base Control class. More...
#include <w32dlib/control.h>
Public Member Functions | |
| Control (Dialog *parent, int resource_id, DataX *datax) | |
| Constructor. | |
| virtual | ~Control () |
| Destructor. | |
| int | ResourceID () |
| Returns the Resource ID for the control. | |
| BOOL | ProcessMessage (UINT msg, WPARAM wp, LPARAM lp) |
| Processes a windows event. | |
| virtual void | DoDataExchange (bool set) |
| Provides a base DoDataExchange. | |
Public Member Functions inherited from W32DLib::Window | |
| 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 TCHAR *text) |
| Sets the window text. | |
| void | SetText (const W32String &text) |
| Sets the window text. | |
| W32String | GetText () |
| Gets the window text. | |
| void | Enable (bool enable) |
| Enables or disables the window. | |
Protected Member Functions | |
| void | AddCallback (UINT msg, UINT notification, Window *owner, W32DLibCallback callback) |
| Add a callback for the control. | |
Protected Member Functions inherited from W32DLib::Window | |
| virtual BOOL | InstanceProc (HWND wnd, UINT msg, WPARAM wp, LPARAM lp) |
| Handles windows messages. | |
Protected Attributes | |
| Dialog * | m_parent |
| Filled in by the constructor with the parent dialog. | |
| int | m_resid |
| Filled in by the constructor with the resource ID. | |
| DataX * | m_data |
| Filled in by the constructor with the DataX object. | |
Protected Attributes inherited from W32DLib::Window | |
| HWND | m_wnd |
| The window handle for this window. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from W32DLib::Window | |
| static BOOL CALLBACK | WindowProc (HWND wnd, UINT msg, WPARAM wp, LPARAM lp) |
| The base WindProc. | |
The base Control class.
Constructor.
When a control is constructed it calls Dialog::AddControl to add itself to the dialog.
|
virtual |
Destructor.
|
protected |
Add a callback for the control.
Note that multiple callbacks can be lodged for the same msg and notification. If this is the case then the result returned through ProcessMessage is the logical OR of all the returns.
When multiple callbacks match they are called in the order they were registered.
|
virtual |
Provides a base DoDataExchange.
This interface is called by the Dialog to say that data exchange should take place.
This base version simply honours DataX eString objects and calls Window::SetText or Window::GetText accordingly.
| set | If true the set the Control from the DataX object. If false then set the DataX object from the Control. |
Reimplemented in W32DLib::ComboBox, W32DLib::AutoCheck, and W32DLib::RadioButton.
| BOOL W32DLib::Control::ProcessMessage | ( | UINT | msg, |
| WPARAM | wp, | ||
| LPARAM | lp | ||
| ) |
Processes a windows event.
This is called by the Dialog when a message is recieved that refers to this control's resource ID.
| msg | The Windows event |
| wp | The Windows event parameters |
| lp | The Windows event parameters |
| int W32DLib::Control::ResourceID | ( | ) |
Returns the Resource ID for the control.
|
protected |
Filled in by the constructor with the parent dialog.
|
protected |
Filled in by the constructor with the resource ID.