Hello,

How can I properly create and use a CPropertySheet object with vertically arranged pages?

Here I've uploaded a demo project with source code included. It's just a simple SDI application which has main view class CVerticalPropSheetView (derived from CView) containing property sheet CPropSheetDemo (derived from CPropertySheet) with 3 property pages:

http://forum.codenet.ru/attachment.p...1&d=1173007311
http://www.rsdn.ru:80/File/35531/VerticalPropSheet.rar

I tried to follow the advice from one of topics at CodeGuru forum (http://www.codeguru.com/forum/archiv.../t-331500.html) however, I've discovered the following issues related to resizing of the property sheet's window in CVerticalPropSheetView::OnSize():

1) When changing size of CPropSheetDemo window so that its width is less than its height, the tabs of the bottom property pages are not properly drawn. It looks like only rectangle part of property sheet (width x width) is being drawn properly.

2) When changing height of CPropertySheet window so that it can't display all tabs, the spin control is displayed. However, it doesn't work (I can't choose tab using spin control).

Does anyone know how to resolve these issues? All above appears only when property pages are arranged vertically - e.g. until I comment the following lines of code in CPropSheetDemo::OnInitDialog():


// create the new font for property pages' titles
CreateNewFont(&m_Font,14,_T("Microsoft Sans Serif"));

// make our property sheet vertical-oriented
CWnd* pctrlTab=GetDlgItem(AFX_IDC_TAB_CONTROL);
if (pctrlTab!=NULL) {
pctrlTab->ModifyStyle(TCS_FOCUSONBUTTONDOWN,TCS_VERTICAL,0);
pctrlTab->SetFont(&m_Font);
}


Many thanks in advance!

dp