comctl32: Avoid code duplication by reusing PROPSHEET_GetPageIndex.

This commit is contained in:
Ričardas Barkauskas 2012-12-21 19:07:17 +02:00 committed by Alexandre Julliard
parent 379d492b12
commit 2c8ea6ebff
1 changed files with 1 additions and 6 deletions

View File

@ -2561,16 +2561,11 @@ static LRESULT PROPSHEET_IndexToHwnd(HWND hwndDlg, int iPageIndex)
*/
static LRESULT PROPSHEET_PageToIndex(HWND hwndDlg, HPROPSHEETPAGE hPage)
{
int index;
PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
TRACE("(%p, %p)\n", hwndDlg, hPage);
for (index = 0; index < psInfo->nPages; index++)
if (psInfo->proppage[index].hpage == hPage)
return index;
WARN("%p not found\n", hPage);
return -1;
return PROPSHEET_GetPageIndex(hPage, psInfo, -1);
}
/******************************************************************************