Tab pages ,, communication problem!!
-
Dear All, I am developing a dialog based application using MFC VC++ Version 6.0 for Windows 2000. The application consists of a TabControl derived from CTabCtrl Class having three tab pages in it. Also, the tabControl has Apply, Cancel , Ok button. My query is how to communicate between the tabpages data and OK,Apply button ?? Similiar case, like "Display properties" dialog box which appears upon right clicking on the desktop. When we select a background and click on apply or ok button to make the changes, the background color gets changed. Following is the code to create the tab pages. I have radio buttons in first CGeneralSettings page and I want to do various operation after user selects one of the radio button and clicks OK or APPLY button /////////////////////////////////// The CMyTabCtrl has following datamember::::::: class CMyTabCtrl : public CTabCtrl { public: CMyTabCtrl(); CDialog *m_tabPages[3]; int m_tabCurrent; int m_nNumberOfPages; ... ..}; CMyTabCtrl::CMyTabCtrl() { m_tabPages[0]=new CGeneralSettings; m_tabPages[1]=new CAuthorization; m_tabPages[2]=new CUnInstallation; m_nNumberOfPages=3; } CMyTabCtrl::~CMyTabCtrl() { for(int nCount=0; nCount < m_nNumberOfPages; nCount++){ delete m_tabPages[nCount]; } } /////////////////////////// Please feel free to ask further clarifications in this regards, Regards, Rohit
-
Dear All, I am developing a dialog based application using MFC VC++ Version 6.0 for Windows 2000. The application consists of a TabControl derived from CTabCtrl Class having three tab pages in it. Also, the tabControl has Apply, Cancel , Ok button. My query is how to communicate between the tabpages data and OK,Apply button ?? Similiar case, like "Display properties" dialog box which appears upon right clicking on the desktop. When we select a background and click on apply or ok button to make the changes, the background color gets changed. Following is the code to create the tab pages. I have radio buttons in first CGeneralSettings page and I want to do various operation after user selects one of the radio button and clicks OK or APPLY button /////////////////////////////////// The CMyTabCtrl has following datamember::::::: class CMyTabCtrl : public CTabCtrl { public: CMyTabCtrl(); CDialog *m_tabPages[3]; int m_tabCurrent; int m_nNumberOfPages; ... ..}; CMyTabCtrl::CMyTabCtrl() { m_tabPages[0]=new CGeneralSettings; m_tabPages[1]=new CAuthorization; m_tabPages[2]=new CUnInstallation; m_nNumberOfPages=3; } CMyTabCtrl::~CMyTabCtrl() { for(int nCount=0; nCount < m_nNumberOfPages; nCount++){ delete m_tabPages[nCount]; } } /////////////////////////// Please feel free to ask further clarifications in this regards, Regards, Rohit
All you need is apply,ok method implemented in each tab pages, can call them when you clicked on apply button on the tabcontrol (in a loop maybe).
I'll write a suicide note on a hundred dollar bill - Dire Straits