Dynamically resizing CMFCPropertySheet using PropSheetLook_OneNoteTabs style
I am trying to dynamically resize CMFCPropertySheet to add a custom control at the bottom of each page. Since all property pages are not the same height, I have a mechanism to increase the size if needed. To do this, I have overridden the OnActivatePage method and using SetWindowPos I can resize the sheet first, then the tab control, then the page, and finally I can move the OK / Cancel / Help buttons. It works fine with PropSheetLook_OutlookBar and PropSheetLook_Tabs styles, but not PropSheetLook_OneNoteTabs style. The page (or tab) is incorrectly changed (the light gray color of the page does not fill the sheet.
OneNote Style OneNote http://www.freeimagehosting.net/uploads/th.ec91600664.jpg
Outlook Outlook Style http://www.freeimagehosting.net/uploads/th.319b6938ab.jpg
Any idea? Feature Feature MFC error?
source to share
Just follow the instructions given in here . Although the instructions are for CPropertySheet , they work for CMFCPropertySheet .
Some parts of the code are outdated, so you need to make the following changes.
- Complete your XmnPropSheetCallback and DoModal implementation .
- In,
OnInitDialog
simply make a callCPropertySheet::OnInitDialog();
and then callOnSize
instead of doing everything in this code.
source to share