diff options
| author | Ian C <ianc@noddybox.co.uk> | 2005-04-04 00:52:23 +0000 |
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2005-04-04 00:52:23 +0000 |
| commit | 3a1bf865b6c1b6b7c096eaf6dab91a465319488a (patch) | |
| tree | 3495061e6af6b819b075b6fdaae66dc115bf187e /src/control.cpp | |
| parent | 98164e7547f7ea21204e69885158cd0494e08c5d (diff) | |
Added DataX
Diffstat (limited to 'src/control.cpp')
| -rw-r--r-- | src/control.cpp | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/src/control.cpp b/src/control.cpp index a8a221f..fa8e2e7 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -21,6 +21,7 @@ #include "w32dlib/window.h" #include "w32dlib/control.h" #include "w32dlib/dialog.h" +#include "w32dlib/datax.h" namespace W32DLib { @@ -28,10 +29,11 @@ namespace W32DLib // ------------------------------------------------------------ // -Control::Control(Dialog *parent, int resource_id) : +Control::Control(Dialog *parent, int resource_id, DataX *datax) : Window(), m_parent(parent), m_resid(resource_id), + m_data(datax), m_cblist() { m_parent->AddControl(this); @@ -88,6 +90,40 @@ BOOL Control::ProcessMessage(UINT msg, WPARAM wp, LPARAM lp) // ------------------------------------------------------------ // +void Control::DoDataExchange(bool set) +{ + if (m_data) + { + if (set) + { + switch(m_data->Type()) + { + case DataX::eString: + SetText(m_data->Str()); + break; + + default: + break; + } + } + else + { + switch(m_data->Type()) + { + case DataX::eString: + m_data->Set(GetText()); + break; + + default: + break; + } + } + } +} + + +// ------------------------------------------------------------ +// void Control::AddCallback(UINT msg, UINT notification, Window *owner, |
