[PATCH] comctrl32: Partial implement PSM_INSERTPAGE (add the new page always at the end) [try 3]
Detlef Riekenberg
wine.dev at web.de
Fri Dec 10 10:48:24 CST 2010
Used by the Microsoft tool MGADiag to add the result property sheets.
try 2 uses DWORD_PTR to be 64bit save
try 3 uses INT_PTR to be 64bit and signed save
MGADiag result: http://www.myimg.de/?img=MGADiagGenuinef734c.png
(Validation status: Genuine)
--
By by ... Detlef
---
dlls/comctl32/propsheet.c | 40 +++++++++++++++++++++-------------------
1 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index f711399..565a34c 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -32,7 +32,6 @@
* - Wizard 97 header resizing
* - Enforcing of minimal wizard size
* - Messages:
- * o PSM_INSERTPAGE
* o PSM_RECALCPAGESIZES
* o PSM_SETHEADERSUBTITLE
* o PSM_SETHEADERTITLE
@@ -114,7 +113,7 @@ typedef struct tagPropSheetInfo
PROPSHEETHEADERW ppshheader;
BOOL unicode;
LPWSTR strPropertiesFor;
- int nPages;
+ INT nPages;
int active_page;
BOOL isModeless;
BOOL hasHelp;
@@ -2244,12 +2243,10 @@ static LRESULT PROPSHEET_QuerySiblings(HWND hwndDlg,
return msgResult;
}
-
/******************************************************************************
- * PROPSHEET_AddPage
+ * PROPSHEET_InsertPage
*/
-static BOOL PROPSHEET_AddPage(HWND hwndDlg,
- HPROPSHEETPAGE hpage)
+static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpage_after, HPROPSHEETPAGE hpage)
{
PropPageInfo * ppi;
PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
@@ -2257,7 +2254,13 @@ static BOOL PROPSHEET_AddPage(HWND hwndDlg,
TCITEMW item;
LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)hpage;
- TRACE("hpage %p\n", hpage);
+ TRACE("(hwndDlg: %p, hpage_after: %p, hpage %p)\n", hwndDlg, hpage_after, hpage);
+
+ if ((((DWORD_PTR) hpage_after) >> 16) || ((INT_PTR) hpage_after < psInfo->nPages))
+ {
+ FIXME("insert page %p after page %p not supported. using append as fallback\n", hpage, hpage_after);
+ }
+
/*
* Allocate and fill in a new PropPageInfo entry.
*/
@@ -2307,6 +2310,17 @@ static BOOL PROPSHEET_AddPage(HWND hwndDlg,
}
/******************************************************************************
+ * PROPSHEET_AddPage
+ */
+static BOOL PROPSHEET_AddPage(HWND hwndDlg, HPROPSHEETPAGE hpage)
+{
+ PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
+
+ TRACE("(%p, %p)\n", hwndDlg, hpage);
+ return PROPSHEET_InsertPage(hwndDlg, (HPROPSHEETPAGE)psInfo->nPages, hpage);
+}
+
+/******************************************************************************
* PROPSHEET_RemovePage
*/
static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
@@ -2476,18 +2490,6 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
}
/******************************************************************************
- * PROPSHEET_InsertPage
- */
-static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter, HPROPSHEETPAGE hpage)
-{
- if (IS_INTRESOURCE(hpageInsertAfter))
- FIXME("(%p, %d, %p): stub\n", hwndDlg, LOWORD(hpageInsertAfter), hpage);
- else
- FIXME("(%p, %p, %p): stub\n", hwndDlg, hpageInsertAfter, hpage);
- return FALSE;
-}
-
-/******************************************************************************
* PROPSHEET_SetHeaderTitleW
*/
static void PROPSHEET_SetHeaderTitleW(HWND hwndDlg, int iPageIndex, LPCWSTR pszHeaderTitle)
--
1.7.1
More information about the wine-patches
mailing list