PATCH: propsheet INDEXTOHWND

Marcus Meissner marcus at jet.franken.de
Sat Jul 31 18:14:22 CDT 2004


Hi,

Verified against DC++, its happier now.

Ciao, Marcus

Changelog:
	Implemented PSM_INDEXTOHWND

Index: dlls//comctl32/propsheet.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/propsheet.c,v
retrieving revision 1.102
diff -u -r1.102 propsheet.c
--- dlls//comctl32/propsheet.c	21 Jul 2004 21:17:59 -0000	1.102
+++ dlls//comctl32/propsheet.c	31 Jul 2004 23:13:19 -0000
@@ -2531,9 +2531,7 @@
     for (index = 0; index < psInfo->nPages; index++)
         if (psInfo->proppage[index].hwndPage == hPageDlg)
             return index;
-
     WARN("%p not found\n", hPageDlg);
-
     return -1;
 }
 
@@ -2542,8 +2540,14 @@
  */
 static LRESULT PROPSHEET_IndexToHwnd(HWND hwndDlg, int iPageIndex)
 {
-    FIXME("(%p, %d): stub\n", hwndDlg, iPageIndex);
-    return 0;
+    PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg,
+                                                       PropSheetInfoStr);
+    TRACE("(%p, %d)\n", hwndDlg, iPageIndex);
+    if (iPageIndex<0 || iPageIndex>=psInfo->nPages) {
+        WARN("%d out of range.\n", iPageIndex);
+	return 0;
+    }
+    return (LRESULT)psInfo->proppage[iPageIndex].hwndPage;
 }
 
 /******************************************************************************
-- 



More information about the wine-patches mailing list