diff options
Diffstat (limited to 'src/test/w32dtst.cpp')
-rw-r--r-- | src/test/w32dtst.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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<W32DLib::W32DLibCallback>(&Test::OnLoad)); m_savebut.OnPress (this,static_cast<W32DLib::W32DLibCallback>(&Test::OnSave)); + m_dirbut.OnPress + (this,static_cast<W32DLib::W32DLibCallback>(&Test::OnDir)); m_combo.OnSelection (this,static_cast<W32DLib::W32DLibCallback>(&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(); |