From 2d704117349864405f1c749b40bdd9d6f819ca03 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 24 Mar 2005 02:09:13 +0000 Subject: Code updates (first working version) --- src/control.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/control.cpp') diff --git a/src/control.cpp b/src/control.cpp index b824cca..392c72e 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -54,6 +54,7 @@ int Control::ResourceID() // void Control::SetText(const char *text) { + SetDlgItemText(m_parent->GetHWND(),m_resid,text); } @@ -75,10 +76,31 @@ std::string Control::GetText(int maxlen) } +// ------------------------------------------------------------ +// +HWND Control::GetHWND() +{ + return m_wnd; +} + + +// ------------------------------------------------------------ +// +void Control::Enable(bool enable) +{ + EnableWindow(m_wnd,enable); +} + + // ------------------------------------------------------------ // BOOL Control::ProcessMessage(UINT msg, WPARAM wp, LPARAM lp) { + if (msg==WM_INITDIALOG) + { + m_wnd=GetDlgItem(m_parent->GetHWND(),m_resid); + } + if (m_cblist.count(msg)>0) { CallbackDetails details=m_cblist[msg]; -- cgit v1.2.3