Skip to content
Snippets Groups Projects
Commit 2c8ea6eb authored by Ričardas Barkauskas's avatar Ričardas Barkauskas Committed by Alexandre Julliard
Browse files

comctl32: Avoid code duplication by reusing PROPSHEET_GetPageIndex.

parent 379d492b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
/******************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment