tAB CONTROL
-
Hi all, I want to use a tab control inside apropertyPage,but i have absolutly no idea about how to use a tab control in MFC.Can i get a step by step Tutorial to add a tab control and adding controls to each tab.I searched the web ,but couldn't found a good tuto.Any help would be appreciated.
-
Hi all, I want to use a tab control inside apropertyPage,but i have absolutly no idea about how to use a tab control in MFC.Can i get a step by step Tutorial to add a tab control and adding controls to each tab.I searched the web ,but couldn't found a good tuto.Any help would be appreciated.
Are you talking about a property sheet that contains multiple property pages? If so, take a peek at CPropertySheet and CPropertyPage.
-
Hi all, I want to use a tab control inside apropertyPage,but i have absolutly no idea about how to use a tab control in MFC.Can i get a step by step Tutorial to add a tab control and adding controls to each tab.I searched the web ,but couldn't found a good tuto.Any help would be appreciated.
NOTE: If you don't know how Property sheets work, continue reading, if you already know, don't continue... ;) Well, a "CPropertySheet" it's a container class, it contains several "CPropertyPage"s. in order to make it work you must follow those easy steps: 1. Create a dialog for each "page" you need. 2. Place all the controls inside the dialog using the resource editor. 3. Then you'll need to map all the messages you need, in order to do so, create a class for the newly created and populated dialog, and select the class CPropertyPage. 4. Repeat step 2 and 3 until you've finished to populate/define the recently created property pages (dialogs). 5. Now you must create a new class from the class wizard, select the base class CPropertySheet. 6. Modify the newly CPropertySheet in order to add the required pages in it's constructor. 7. Call the property sheet from your code. this is how it works... if you need more help on this topic, e-mail me... hope this helps...
-
NOTE: If you don't know how Property sheets work, continue reading, if you already know, don't continue... ;) Well, a "CPropertySheet" it's a container class, it contains several "CPropertyPage"s. in order to make it work you must follow those easy steps: 1. Create a dialog for each "page" you need. 2. Place all the controls inside the dialog using the resource editor. 3. Then you'll need to map all the messages you need, in order to do so, create a class for the newly created and populated dialog, and select the class CPropertyPage. 4. Repeat step 2 and 3 until you've finished to populate/define the recently created property pages (dialogs). 5. Now you must create a new class from the class wizard, select the base class CPropertySheet. 6. Modify the newly CPropertySheet in order to add the required pages in it's constructor. 7. Call the property sheet from your code. this is how it works... if you need more help on this topic, e-mail me... hope this helps...
-
Are you talking about a property sheet that contains multiple property pages? If so, take a peek at CPropertySheet and CPropertyPage.
-
NOTE: If you don't know how Property sheets work, continue reading, if you already know, don't continue... ;) Well, a "CPropertySheet" it's a container class, it contains several "CPropertyPage"s. in order to make it work you must follow those easy steps: 1. Create a dialog for each "page" you need. 2. Place all the controls inside the dialog using the resource editor. 3. Then you'll need to map all the messages you need, in order to do so, create a class for the newly created and populated dialog, and select the class CPropertyPage. 4. Repeat step 2 and 3 until you've finished to populate/define the recently created property pages (dialogs). 5. Now you must create a new class from the class wizard, select the base class CPropertySheet. 6. Modify the newly CPropertySheet in order to add the required pages in it's constructor. 7. Call the property sheet from your code. this is how it works... if you need more help on this topic, e-mail me... hope this helps...
-
Are you talking about a property sheet that contains multiple property pages? If so, take a peek at CPropertySheet and CPropertyPage.
-
Hi , I again have a problem,i have this modal tabbed Dialog inside a propertyPage,I want this tabbed sheet as a fixed position(unmovable,unresizable).
-
I don't understand you: if you have one thing inside another, normally the child window is not resizeable and neither it can be moveable... have you created the new window as a child of the parent one?
Hi, No I am creating a window in OnSetActive() event of the propertyPage that contains it.I don't know how to make it a child. My code looks like this: //CReportWizPage is a propertyPage on which i want to create the Tabbed Pages. //CReportTabbed is the PropertySheet that embeds these pages. CReportWizPage::OnSetActive() { CPropertySheet* psheet = (CPropertySheet*) GetParent(); psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT); CReportTabbed report(IDS_TABBED,this); CReport1Tab rep1; CReport2Tab rep2; report.AddPage(&rep1); report.AddPage(&rep2); if(report.DoModal() == IDOK) { //........ } return CPropertyPage::OnSetActive(); }
-
Hi, No I am creating a window in OnSetActive() event of the propertyPage that contains it.I don't know how to make it a child. My code looks like this: //CReportWizPage is a propertyPage on which i want to create the Tabbed Pages. //CReportTabbed is the PropertySheet that embeds these pages. CReportWizPage::OnSetActive() { CPropertySheet* psheet = (CPropertySheet*) GetParent(); psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT); CReportTabbed report(IDS_TABBED,this); CReport1Tab rep1; CReport2Tab rep2; report.AddPage(&rep1); report.AddPage(&rep2); if(report.DoModal() == IDOK) { //........ } return CPropertyPage::OnSetActive(); }
if you use DoModal(), then you are making the property sheet appear as a standalone component that isn't owned by nobody (only by the app).
this->m_pPSEstacio = new CPSEstacio("", this, 0); this->m_pPSEstacio->Create(this, WS_CHILD | WS_TABSTOP | WS_VISIBLE); this->m_pPSEstacio->ModifyStyleEx(0,WS_EX_CONTROLPARENT); // if you don't do this you won't be able to get access to the parent's window controls by pressing tab...
Hope this helps... -
if you use DoModal(), then you are making the property sheet appear as a standalone component that isn't owned by nobody (only by the app).
this->m_pPSEstacio = new CPSEstacio("", this, 0); this->m_pPSEstacio->Create(this, WS_CHILD | WS_TABSTOP | WS_VISIBLE); this->m_pPSEstacio->ModifyStyleEx(0,WS_EX_CONTROLPARENT); // if you don't do this you won't be able to get access to the parent's window controls by pressing tab...
Hope this helps...