From 1206b7e0bda3ff813cb0bfe3eb109a58543b3d94 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 Oct 2017 01:37:29 +0200 Subject: [PATCH] Return HRESULT, not BOOL, from TaskDialogCallbackProc Although this doesn't change anything because, by a happy concourse of circumstances, FALSE is the same as S_OK and TRUE is the same as S_FALSE numerically, it is still better and more clear, because consistent with the documentation, to return these constants from the task dialog callback function rather than boolean ones. --- src/msw/progdlg.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/msw/progdlg.cpp b/src/msw/progdlg.cpp index ab7d57e8c3..5c261f57c4 100644 --- a/src/msw/progdlg.cpp +++ b/src/msw/progdlg.cpp @@ -1028,7 +1028,7 @@ wxProgressDialogTaskRunner::TaskDialogCallbackProc case Id_SkipBtn: ::SendMessage(hwnd, TDM_ENABLE_BUTTON, Id_SkipBtn, FALSE); sharedData->m_skipped = true; - return TRUE; + return S_FALSE; case IDCANCEL: if ( sharedData->m_state == wxProgressDialog::Finished ) @@ -1038,7 +1038,7 @@ wxProgressDialogTaskRunner::TaskDialogCallbackProc sharedData->m_state = wxProgressDialog::Dismissed; // Let Windows close the dialog. - return FALSE; + return S_OK; } // Close button on the window triggers an IDCANCEL press, @@ -1060,7 +1060,7 @@ wxProgressDialogTaskRunner::TaskDialogCallbackProc sharedData->m_state = wxProgressDialog::Canceled; } - return TRUE; + return S_FALSE; } break; @@ -1091,11 +1091,11 @@ wxProgressDialogTaskRunner::TaskDialogCallbackProc sharedData->m_winPosition = wxPoint(r.left, r.top); } - return TRUE; + return S_FALSE; } // Return anything. - return 0; + return S_OK; } #endif // wxHAS_MSW_TASKDIALOG