Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/propsheet.c:
- HWND focusable_item = NULL;
- HWND initial_focus = NULL;
- focusable_item = GetNextDlgTabItem(psInfo->proppage[index].hwndPage, NULL, FALSE);
- if (!focusable_item)
return;
- psn.hdr.code = PSN_QUERYINITIALFOCUS;
- psn.hdr.hwndFrom = hwndDlg;
- psn.hdr.idFrom = 0;
- psn.lParam = 0;
- initial_focus = (HWND)SendMessageW(psInfo->proppage[index].hwndPage, WM_NOTIFY, 0, (LPARAM)&psn);
- if (initial_focus)
SetFocus(initial_focus);
- else if (focusable_item)
SetFocus(focusable_item);
And here