summaryrefslogtreecommitdiff
path: root/src/control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/control.cpp')
-rw-r--r--src/control.cpp22
1 files changed, 22 insertions, 0 deletions
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);
}
@@ -77,8 +78,29 @@ 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];