comctl32: set proper result value for property sheet cancel button.
Michael Moss
mmoss at google.com
Fri Apr 11 11:57:41 CDT 2008
[originally a Picasa patch by Aric Stewart]
A property sheet should return 0 if the cancel button is pressed not 1. This is
confirmed with win2k's comctl32.dll.
---
dlls/comctl32/propsheet.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index a193082..146a251 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -1710,7 +1710,10 @@ static BOOL PROPSHEET_Finish(HWND hwndDlg)
if (psInfo->isModeless)
psInfo->activeValid = FALSE;
else
+ {
psInfo->ended = TRUE;
+ psInfo->result= 1;
+ }
return TRUE;
}
@@ -1823,7 +1826,10 @@ static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam)
psInfo->activeValid = FALSE;
}
else
+ {
psInfo->ended = TRUE;
+ psInfo->result= 0;
+ }
}
/******************************************************************************
@@ -2382,6 +2388,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
if (!psInfo->isModeless)
{
psInfo->ended = TRUE;
+ psInfo->result= 0;
return TRUE;
}
}
@@ -3176,7 +3183,10 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
if (psInfo->isModeless)
psInfo->activeValid = FALSE;
else
+ {
psInfo->ended = TRUE;
+ psInfo->result= 1;
+ }
}
else
EnableWindow(hwndApplyBtn, FALSE);
--
1.5.3.GIT
More information about the wine-patches
mailing list