summaryrefslogtreecommitdiff
path: root/src/w32dlib/control.h
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-04-04 00:52:23 +0000
committerIan C <ianc@noddybox.co.uk>2005-04-04 00:52:23 +0000
commit3a1bf865b6c1b6b7c096eaf6dab91a465319488a (patch)
tree3495061e6af6b819b075b6fdaae66dc115bf187e /src/w32dlib/control.h
parent98164e7547f7ea21204e69885158cd0494e08c5d (diff)
Added DataX
Diffstat (limited to 'src/w32dlib/control.h')
-rw-r--r--src/w32dlib/control.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/w32dlib/control.h b/src/w32dlib/control.h
index 3cc01e5..f645a98 100644
--- a/src/w32dlib/control.h
+++ b/src/w32dlib/control.h
@@ -40,8 +40,10 @@ namespace W32DLib
///
/// \param parent The Dialog the control belongs to.
/// \param resource_id The ID of the control in the resource file.
+ /// \param datax The DataX to use. The default of 0 means don't
+ /// use data exchange.
///
- Control(Dialog *parent, int resource_id);
+ Control(Dialog *parent, int resource_id, DataX *datax=0);
/// \brief Destructor
///
@@ -63,6 +65,20 @@ namespace W32DLib
///
BOOL ProcessMessage(UINT msg, WPARAM wp, LPARAM lp);
+ /// \brief 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 \link DataX::eString eString
+ /// \endlink objects and calls
+ /// Window::SetText or Window::GetText accordingly.
+ ///
+ /// \param set If true the set the Control from the DataX object. If
+ /// false then set the DataX object from the Control.
+ ///
+ virtual void DoDataExchange(bool set);
+
protected:
/// \brief Add a callback for the control.
@@ -88,6 +104,10 @@ namespace W32DLib
///
int m_resid;
+ /// \brief Filled in by the constructor with the DataX object.
+ ///
+ DataX *m_data;
+
private:
struct CallbackDetails