From 2e7f3ad702191423466dd4fd2b516a003bbca8c7 Mon Sep 17 00:00:00 2001 From: Thomas Weidenmueller Date: Fri, 15 Jul 2005 11:42:18 +0000 Subject: [PATCH] Support PSM_IDTOINDEX. --- dlls/comctl32/propsheet.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 9aa84b92e98..62a9dcc9538 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -33,7 +33,6 @@ * - Enforcing of minimal wizard size * - Messages: * o PSM_GETRESULT - * o PSM_IDTOINDEX * o PSM_INSERTPAGE * o PSM_RECALCPAGESIZES * o PSM_SETHEADERSUBTITLE @@ -2622,7 +2621,17 @@ static LRESULT PROPSHEET_IndexToPage(HWND hwndDlg, int iPageIndex) */ static LRESULT PROPSHEET_IdToIndex(HWND hwndDlg, int iPageId) { - FIXME("(%p, %d): stub\n", hwndDlg, iPageId); + int index; + LPCPROPSHEETPAGEW psp; + PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, + PropSheetInfoStr); + TRACE("(%p, %d)\n", hwndDlg, iPageId); + for (index = 0; index < psInfo->nPages; index++) { + psp = (LPCPROPSHEETPAGEW)psInfo->proppage[index].hpage; + if (psp->u.pszTemplate == (LPCWSTR)iPageId) + return index; + } + return -1; }