Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2018-05-03 00:28:04 +0300
committerKornel <kornel@geekhood.net>2018-05-03 00:28:04 +0300
commit18dc2b41613055f0daf7f6a1d4311368798ea12a (patch)
tree866f6e6a50406fe822cb78f80728b7aebfd79786 /CPP/Windows/Control
parentf19b649c73cd8b74c4e0b8a3a728a82c6bda47b4 (diff)
18.0518.05
Diffstat (limited to 'CPP/Windows/Control')
-rw-r--r--CPP/Windows/Control/Dialog.cpp1
-rw-r--r--CPP/Windows/Control/Dialog.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/CPP/Windows/Control/Dialog.cpp b/CPP/Windows/Control/Dialog.cpp
index 9df3ef5e..020694a6 100644
--- a/CPP/Windows/Control/Dialog.cpp
+++ b/CPP/Windows/Control/Dialog.cpp
@@ -72,6 +72,7 @@ bool CDialog::OnButtonClicked(int buttonID, HWND /* buttonHWND */)
{
case IDOK: OnOK(); break;
case IDCANCEL: OnCancel(); break;
+ case IDCLOSE: OnClose(); break;
case IDHELP: OnHelp(); break;
default: return false;
}
diff --git a/CPP/Windows/Control/Dialog.h b/CPP/Windows/Control/Dialog.h
index 59b9f419..33caa5b2 100644
--- a/CPP/Windows/Control/Dialog.h
+++ b/CPP/Windows/Control/Dialog.h
@@ -105,6 +105,7 @@ public:
virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
virtual void OnOK() {};
virtual void OnCancel() {};
+ virtual void OnClose() {}
virtual bool OnNotify(UINT /* controlID */, LPNMHDR /* lParam */) { return false; }
virtual bool OnTimer(WPARAM /* timerID */, LPARAM /* callback */) { return false; }
@@ -133,6 +134,7 @@ public:
#endif
virtual void OnOK() { Destroy(); }
virtual void OnCancel() { Destroy(); }
+ virtual void OnClose() { Destroy(); }
};
class CModalDialog: public CDialog
@@ -147,6 +149,7 @@ public:
bool End(INT_PTR result) { return BOOLToBool(::EndDialog(_window, result)); }
virtual void OnOK() { End(IDOK); }
virtual void OnCancel() { End(IDCANCEL); }
+ virtual void OnClose() { End(IDCLOSE); }
};
class CDialogChildControl: public NWindows::CWindow