tab controls (is there a restriction on the number of edit boxes in a dialog box?)
-
hi.. i have a problem here. I am making use of a tab control in a dialog box. Since I have 3 pages which all require edit boxes, i will need to have overlapping ones (in order to ensure that each tab page gets a edit box of its own). However, i couldn't add edit boxes afer some time. can anyone enlighten me? is there a restriction to the number of edit boxes that could be added? is the way i do things correct? as in making edit boxes overlap each other so that they will be displayed correspondingly (in correct position) in the various tabs correctly. Hope You guys can help me out on this!!! Thanks a lot!
-
hi.. i have a problem here. I am making use of a tab control in a dialog box. Since I have 3 pages which all require edit boxes, i will need to have overlapping ones (in order to ensure that each tab page gets a edit box of its own). However, i couldn't add edit boxes afer some time. can anyone enlighten me? is there a restriction to the number of edit boxes that could be added? is the way i do things correct? as in making edit boxes overlap each other so that they will be displayed correspondingly (in correct position) in the various tabs correctly. Hope You guys can help me out on this!!! Thanks a lot!
-
hi.. i have a problem here. I am making use of a tab control in a dialog box. Since I have 3 pages which all require edit boxes, i will need to have overlapping ones (in order to ensure that each tab page gets a edit box of its own). However, i couldn't add edit boxes afer some time. can anyone enlighten me? is there a restriction to the number of edit boxes that could be added? is the way i do things correct? as in making edit boxes overlap each other so that they will be displayed correspondingly (in correct position) in the various tabs correctly. Hope You guys can help me out on this!!! Thanks a lot!
azure33 wrote: is there a restriction to the number of edit boxes that could be added? In the past, the resource editor was limited to 255 controls. Whether that is still the case or not, I do not know. I've never been in the position to require that many. Adding the controls dynamically is limitless, I think.
A rich person is not the one who has the most, but the one that needs the least.
-
Sorrie right now what i'm not using CPropertySheet and CPropertyPage. Is it true that using tabs will always necessary need to use them? So do i just need to modify my code or redo it entirely?Since my tabs are done in a overlapping fashion (do you get what i mean?) I hope I don't have to redo everything, cos it can be pretty tedious. any hints on how to go about doing that??? Thanks for your help!
-
Sorrie right now what i'm not using CPropertySheet and CPropertyPage. Is it true that using tabs will always necessary need to use them? So do i just need to modify my code or redo it entirely?Since my tabs are done in a overlapping fashion (do you get what i mean?) I hope I don't have to redo everything, cos it can be pretty tedious. any hints on how to go about doing that??? Thanks for your help!
Yes, I know that is a very hard work.... If you want you can use the tabctrl with a lot of controls like editbox, labels, custom controls, in it, but is very dificult to use because you must to oredr the controls in the OnInitDialog. Other solution is to create the controls in OnInitDialog. When you feel that you are going crazy, it's better to use Property Sheet and Property Pages, because you will have each control in its dialog.... Each Dialog that will be a tab must be derived from CPropertyPage and not from CDialog. Then When you need to principal dialog, with all the dialogs in it, you must to use the CPropertySheet class and use the funcion AddPage for add each dialog in the Property Sheet... Regards Carlos Antollini Do you know piFive[^] ?
-
Yes, I know that is a very hard work.... If you want you can use the tabctrl with a lot of controls like editbox, labels, custom controls, in it, but is very dificult to use because you must to oredr the controls in the OnInitDialog. Other solution is to create the controls in OnInitDialog. When you feel that you are going crazy, it's better to use Property Sheet and Property Pages, because you will have each control in its dialog.... Each Dialog that will be a tab must be derived from CPropertyPage and not from CDialog. Then When you need to principal dialog, with all the dialogs in it, you must to use the CPropertySheet class and use the funcion AddPage for add each dialog in the Property Sheet... Regards Carlos Antollini Do you know piFive[^] ?
Yeah!! Thanks a lot for your help!!:rose: i know that I have to make use of CPropertySheet etc but most of the books i referred to , dont give me any information on how to go about doing tabs at all... :((:confused: Any good websites to recommend? Hope i can manage to complete it on time. Thank you very much!!!!!!!!!!! :)
-
Yeah!! Thanks a lot for your help!!:rose: i know that I have to make use of CPropertySheet etc but most of the books i referred to , dont give me any information on how to go about doing tabs at all... :((:confused: Any good websites to recommend? Hope i can manage to complete it on time. Thank you very much!!!!!!!!!!! :)
I was looking here in CP, but each article about PropertySheet and PropertyPage are about special implementacion. I pasted you a lines of code..... Trie to start with it, and then read in MDSN.... Don't worry is very easy.... Rememeber: each dialog must be derived from CPropertyPage, not from CDialog
CPropertySheet dlgProperties("Properties", this); CMyPropertieDlg dlg1; //this dialog is a property page. CMyPropertieDlg dlg2; //this dialog is a property page. dlgProperties.AddPage(&dlg1); dlgProperties.AddPage(&dlg2); dlgProperties.m_psh.dwFlags |= PSH_NOAPPLYNOW; if(dlgProperties.m_psh.dwFlags & PSH_HASHELP) dlgProperties.m_psh.dwFlags ^= PSH_HASHELP; dlg1.m_strCubeName = m_strCubeName; dlg1.m_strCatalogName = strCatalogName; dlg1.m_strCreatedOn = strCreatedOn; dlg2.m_strLastUpdate = strDate; dlg2.m_strDescription = strDescription; if(dlgProperties.DoModal() != IDCANCEL) return;
Regards Carlos Antollini Do you know piFive[^] ? -
I was looking here in CP, but each article about PropertySheet and PropertyPage are about special implementacion. I pasted you a lines of code..... Trie to start with it, and then read in MDSN.... Don't worry is very easy.... Rememeber: each dialog must be derived from CPropertyPage, not from CDialog
CPropertySheet dlgProperties("Properties", this); CMyPropertieDlg dlg1; //this dialog is a property page. CMyPropertieDlg dlg2; //this dialog is a property page. dlgProperties.AddPage(&dlg1); dlgProperties.AddPage(&dlg2); dlgProperties.m_psh.dwFlags |= PSH_NOAPPLYNOW; if(dlgProperties.m_psh.dwFlags & PSH_HASHELP) dlgProperties.m_psh.dwFlags ^= PSH_HASHELP; dlg1.m_strCubeName = m_strCubeName; dlg1.m_strCatalogName = strCatalogName; dlg1.m_strCreatedOn = strCreatedOn; dlg2.m_strLastUpdate = strDate; dlg2.m_strDescription = strDescription; if(dlgProperties.DoModal() != IDCANCEL) return;
Regards Carlos Antollini Do you know piFive[^] ?hello!!!! I have finally understood what it means to use CPropertyPage and CPropertySheet... But then I realised that I couldn't display the tabbed page after adding a certain number of combo boxes...... I'm going crazy. How come does a problem with displaying the combo boxes?? thanks!