resizing a property sheet
-
This , I thought would be simple. I have spent close to half a day figuring this out . So I am working on a MFC dialog app that has a CPropertySheet object. I am using the property sheet in Non Wizard mode.
MyDlg::OnInitDialog(.) { .. CPropPage1 *pPage = new CPropPage1() ; m_sheet.AddPage(pPage); //m_sheet.DoModal(); if(!m_sheet.Create(this,WS_CHILD | WS_VISIBLE |WS_BORDER)) return FALSE ; m_bInitialized = true ; }
I am unable to size the propertyPage to fit the dimensions of the main dialog window. What should I be doing to ensure that the current active page in the PropertySheet is contained within the bounds of the Main dialog . This is how my dialog looks at this point ( awful ! :() http://i25.tinypic.com/2mhiob8.jpg Help is appreciatedEngineering is the effort !
-
This , I thought would be simple. I have spent close to half a day figuring this out . So I am working on a MFC dialog app that has a CPropertySheet object. I am using the property sheet in Non Wizard mode.
MyDlg::OnInitDialog(.) { .. CPropPage1 *pPage = new CPropPage1() ; m_sheet.AddPage(pPage); //m_sheet.DoModal(); if(!m_sheet.Create(this,WS_CHILD | WS_VISIBLE |WS_BORDER)) return FALSE ; m_bInitialized = true ; }
I am unable to size the propertyPage to fit the dimensions of the main dialog window. What should I be doing to ensure that the current active page in the PropertySheet is contained within the bounds of the Main dialog . This is how my dialog looks at this point ( awful ! :() http://i25.tinypic.com/2mhiob8.jpg Help is appreciatedEngineering is the effort !
Your example is a CPropertyView on a CFrameDialog? So, your CPropertyView has to handle WM_SIZE and resize itself appropriatly. Also, the View has to relay the message to the active page. In addition to look at a few of the solution here on CodeProject, there is an article form a very interesting series): Control Resizing[^] Also, MS has a step-by-step walktrough[^].
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all.
Douglas Adams, "Dirk Gently's Holistic Detective Agency" -
This , I thought would be simple. I have spent close to half a day figuring this out . So I am working on a MFC dialog app that has a CPropertySheet object. I am using the property sheet in Non Wizard mode.
MyDlg::OnInitDialog(.) { .. CPropPage1 *pPage = new CPropPage1() ; m_sheet.AddPage(pPage); //m_sheet.DoModal(); if(!m_sheet.Create(this,WS_CHILD | WS_VISIBLE |WS_BORDER)) return FALSE ; m_bInitialized = true ; }
I am unable to size the propertyPage to fit the dimensions of the main dialog window. What should I be doing to ensure that the current active page in the PropertySheet is contained within the bounds of the Main dialog . This is how my dialog looks at this point ( awful ! :() http://i25.tinypic.com/2mhiob8.jpg Help is appreciatedEngineering is the effort !
act_x wrote:
I am unable to size the propertyPage to fit the dimensions of the main dialog window.
So the main dialog window is not the property sheet itself?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
This , I thought would be simple. I have spent close to half a day figuring this out . So I am working on a MFC dialog app that has a CPropertySheet object. I am using the property sheet in Non Wizard mode.
MyDlg::OnInitDialog(.) { .. CPropPage1 *pPage = new CPropPage1() ; m_sheet.AddPage(pPage); //m_sheet.DoModal(); if(!m_sheet.Create(this,WS_CHILD | WS_VISIBLE |WS_BORDER)) return FALSE ; m_bInitialized = true ; }
I am unable to size the propertyPage to fit the dimensions of the main dialog window. What should I be doing to ensure that the current active page in the PropertySheet is contained within the bounds of the Main dialog . This is how my dialog looks at this point ( awful ! :() http://i25.tinypic.com/2mhiob8.jpg Help is appreciatedEngineering is the effort !
I think you'll find the answer in this article: Free size and extended styles in CPropertySheets[^] HTH,
Change of fashion is the tax levied by the industry of the poor on the vanity of the rich Fold with us! ¤ flickr