Thursday, March 27, 2008
Why can't I access the pages of my Property Sheet until they have been viewed?
The property sheet control is implemented so that it does not waste time loading pages that are not going to be used. It takes the approach of loading each page when the user clicks on the tab for that page. Therefore, if you make a call to PropSheet_IndexToHwnd prior to having that page viewed, the function will return NULL. However, it is possible to tell the control to load pages upon initialization. You can do this by setting the flag PSP_PREMATURE in the dwFlags parameter of each PROPSHEETPAGE structure for pages that you want loaded at initialization.