Re: MFC: adding a control into a dialog window
typedef list<CControl *> CONTROLLIST;
/////////////////////////////////////////////////////////////////////
class CMyDialog : public CDialog
{
.
.
.
CONTROLLIST m_ControlList;
CONTROLLIST::iterator m_ControlIterator;
.
.
};
// To add a new control
void CMyDialog::AddControl()
{
CControl *pNewControl;
pControlNode = new CControl();
if (pNewControl)
m_ControlList.insert(m_ControlList.end(), pNewControl);
else
AfxMessageBox("Control creation failed!\n");
}
// Similar approach for deleting, etc.
Too advanced for me. Message saved for future use... :)
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.5
^ ^ 11:48:01 up 4 days 20:38 3 users load average: 1.00 1.00 1.00
? ? (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/