From 523f54fd722e1f717e452a1b19439764dfc7d8c3 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Tue, 19 Sep 2023 16:57:30 +0900 Subject: [PATCH] add AtlDialogApp sample 2 --- samples/AtlDialogApp/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/samples/AtlDialogApp/main.cpp b/samples/AtlDialogApp/main.cpp index 8f1efa5..302bc09 100644 --- a/samples/AtlDialogApp/main.cpp +++ b/samples/AtlDialogApp/main.cpp @@ -46,12 +46,21 @@ class CMainWindow : public CDialogImpl return 0; } + BOOL OnOK() + { + // TODO: Do something + return TRUE; + } + LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { switch (LOWORD(wParam)) { case IDOK: - EndDialog(IDOK); + if (OnOK()) + { + EndDialog(IDOK); + } break; case IDCANCEL: EndDialog(IDCANCEL);