[1/2] comctl32: Implement PSM_SETHEADERTITLE[AW]

André Hentschel nerv at dawncrow.de
Sun Dec 25 16:42:11 CST 2011


tested with .net 4.0 installer as i don't see a way to test that in testsuite because i can't read the titles back for example.
some wild guess tests showed that a NULL pszHeaderTitle leads to a crash on windows, so i don't handle that case here, too.
---
 dlls/comctl32/propsheet.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index e6d2d30..1f08f94 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -35,7 +35,6 @@
  *     o PSM_INSERTPAGE
  *     o PSM_RECALCPAGESIZES
  *     o PSM_SETHEADERSUBTITLE
- *     o PSM_SETHEADERTITLE
  *     o WM_HELP
  *     o WM_CONTEXTMENU
  *   - Notifications:
@@ -2491,7 +2490,13 @@ static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter,
  */
 static void PROPSHEET_SetHeaderTitleW(HWND hwndDlg, int iPageIndex, LPCWSTR pszHeaderTitle)
 {
-    FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_w(pszHeaderTitle));
+    PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
+    LPPROPSHEETPAGEW ppshpage = (LPPROPSHEETPAGEW)psInfo->proppage[iPageIndex].hpage;
+
+    TRACE("(%p, %d, %s)\n", hwndDlg, iPageIndex, debugstr_w(pszHeaderTitle));
+
+    ppshpage->pszHeaderTitle = pszHeaderTitle;
+    ppshpage->dwFlags |= PSP_USEHEADERTITLE;
 }
 
 /******************************************************************************
@@ -2499,7 +2504,13 @@ static void PROPSHEET_SetHeaderTitleW(HWND hwndDlg, int iPageIndex, LPCWSTR pszH
  */
 static void PROPSHEET_SetHeaderTitleA(HWND hwndDlg, int iPageIndex, LPCSTR pszHeaderTitle)
 {
-    FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_a(pszHeaderTitle));
+    PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
+    LPPROPSHEETPAGEW ppshpage = (LPPROPSHEETPAGEW)psInfo->proppage[iPageIndex].hpage;
+
+    TRACE("(%p, %d, %s)\n", hwndDlg, iPageIndex, debugstr_a(pszHeaderTitle));
+
+    PROPSHEET_AtoW( &ppshpage->pszHeaderTitle, pszHeaderTitle );
+    ppshpage->dwFlags |= PSP_USEHEADERTITLE;
 }
 
 /******************************************************************************
-- 

Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20111225/0d066b4e/attachment.ksh>


More information about the wine-patches mailing list