summaryrefslogtreecommitdiff
path: root/src/test/w32dtst.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/w32dtst.cpp')
-rw-r--r--src/test/w32dtst.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/w32dtst.cpp b/src/test/w32dtst.cpp
index 0e09ea2..75b5b44 100644
--- a/src/test/w32dtst.cpp
+++ b/src/test/w32dtst.cpp
@@ -59,6 +59,9 @@ public:
(this,static_cast<W32DLib::W32DLibCallback>(&Test::OnComboDbl));
m_combo.OnTextChanged
(this,static_cast<W32DLib::W32DLibCallback>(&Test::OnComboTxt));
+
+ SetMenuProc
+ (this,static_cast<W32DLib::W32DLibCallback>(&Test::OnMenu));
}
virtual ~Test()
@@ -201,6 +204,25 @@ private:
std::cout << ":GetText=" << m_text.GetText() << std::endl;
return TRUE;
}
+
+ BOOL OnMenu(UINT msg, WPARAM wp, LPARAM lp)
+ {
+ int cmd=LOWORD(wp);
+
+ std::cout << "Menu command " << cmd << std::endl;
+
+ switch(cmd)
+ {
+ case IDMENUQUIT:
+ Dialog::Close(IDCANCEL);
+ break;
+
+ default:
+ break;
+ }
+
+ return TRUE;
+ }
};
int WINAPI WinMain (HINSTANCE hInstance,
@@ -217,6 +239,10 @@ int WINAPI WinMain (HINSTANCE hInstance,
{
std::cout << "res=IDOK" << std::endl;
}
+ else if (i==IDCANCEL)
+ {
+ std::cout << "res=IDCANCEL" << std::endl;
+ }
else
{
std::cout << "res=" << i << std::endl;