Don't get confused if PSN_SETACTIVE returns a positive number that

isn't a resource id.
This commit is contained in:
Huw Davies 2003-11-03 22:15:39 +00:00 committed by Alexandre Julliard
parent b37adfb4b5
commit f94159cdb2
1 changed files with 10 additions and 4 deletions

View File

@ -2028,19 +2028,25 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
index+=skipdir;
if (index < 0) {
index = 0;
FIXME("Tried to skip before first property sheet page!\n");
WARN("Tried to skip before first property sheet page!\n");
break;
}
if (index >= psInfo->nPages) {
FIXME("Tried to skip after last property sheet page!\n");
WARN("Tried to skip after last property sheet page!\n");
index = psInfo->nPages-1;
break;
}
}
else if (result != 0)
{
index = PROPSHEET_FindPageByResId(psInfo, result);
continue;
int old_index = index;
index = PROPSHEET_FindPageByResId(psInfo, result);
if(index >= psInfo->nPages) {
index = old_index;
WARN("Tried to skip to nonexistant page by res id\n");
break;
}
continue;
}
}
/*