From a6c8b4498363db99d0de8f15e7bc8a9cfc1a7f81 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 11 Apr 2005 20:25:39 +0000 Subject: Added Common::DirSelect(). Also added '--archive' switch to w32dlib-config. --- src/test/w32dtst.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/test/w32dtst.cpp') diff --git a/src/test/w32dtst.cpp b/src/test/w32dtst.cpp index e3a55cf..94245ba 100644 --- a/src/test/w32dtst.cpp +++ b/src/test/w32dtst.cpp @@ -44,6 +44,8 @@ public: , m_loadbut(this,IDLOADBUT,0) , m_save(this,IDSAVETXT,0) , m_savebut(this,IDSAVEBUT,0) + , m_dir(this,IDDIRTXT,0) + , m_dirbut(this,IDDIRBUT,0) , m_combo(this,IDCOMBO,&m_combo_data) , m_radio1(this,IDRADIO1,IDRADIO1,IDRADIO3,&m_radio1_data) , m_radio2(this,IDRADIO2,IDRADIO1,IDRADIO3,&m_radio2_data) @@ -63,6 +65,8 @@ public: (this,static_cast(&Test::OnLoad)); m_savebut.OnPress (this,static_cast(&Test::OnSave)); + m_dirbut.OnPress + (this,static_cast(&Test::OnDir)); m_combo.OnSelection (this,static_cast(&Test::OnComboSel)); @@ -137,6 +141,9 @@ private: W32DLib::Text m_save; W32DLib::Button m_savebut; + W32DLib::Text m_dir; + W32DLib::Button m_dirbut; + W32DLib::ComboBox m_combo; W32DLib::RadioButton m_radio1; @@ -145,6 +152,7 @@ private: std::string m_loadpath; std::string m_savepath; + std::string m_dirpath; BOOL OnQuit(UINT msg, WPARAM wp, LPARAM lp) { @@ -231,6 +239,18 @@ private: return TRUE; } + BOOL OnDir(UINT msg, WPARAM wp, LPARAM lp) + { + if (W32DLib::Common::SelectDir(this->GetHWND(), + "Select a directory", + m_dirpath)) + { + m_dir.SetText(m_dirpath); + } + + return TRUE; + } + BOOL OnComboSel(UINT msg, WPARAM wp, LPARAM lp) { int sel=m_combo.SelectedIndex(); -- cgit v1.2.3