From ac514e1ad0cc1320a9be0121e5e80aa8773597de Mon Sep 17 00:00:00 2001 From: Thuy Nguyen Date: Sun, 31 Oct 1999 18:29:47 +0000 Subject: [PATCH] PSM_ADDPAGE returns TRUE or FALSE. --- dlls/comctl32/propsheet.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index ac42b01cc81..04988045d2d 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -1517,7 +1517,7 @@ static BOOL PROPSHEET_AddPage(HWND hwndDlg, psInfo->nPages++; - return FALSE; + return TRUE; } /****************************************************************************** @@ -2073,8 +2073,21 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } case PSM_ADDPAGE: - PROPSHEET_AddPage(hwnd, (HPROPSHEETPAGE)lParam); + { + /* + * Note: MSVC++ 6.0 documentation says that PSM_ADDPAGE does not have + * a return value. This is not true. PSM_ADDPAGE returns TRUE + * on success or FALSE otherwise, as specified on MSDN Online. + * Also see the MFC code for + * CPropertySheet::AddPage(CPropertyPage* pPage). + */ + + BOOL msgResult = PROPSHEET_AddPage(hwnd, (HPROPSHEETPAGE)lParam); + + SetWindowLongA(hwnd, DWL_MSGRESULT, msgResult); + return TRUE; + } case PSM_REMOVEPAGE: PROPSHEET_RemovePage(hwnd, (int)wParam, (HPROPSHEETPAGE)lParam); -- 2.11.4.GIT