pheks 0 Newbie Poster

Basically this is what i want to do:
myClass::DoDataExchange(CDataExchange* pDX)
{
DDX_Text(pDX,IDC_EDIT_WORKSTATION_NO,myPointer->attribute,sizeof (myPointer->attribute));
DDX_Text(pDX,IDC_EDIT_FAULT_DESCRIPTION,myPointer->myVariable,sizeof(myPointer->myVariable));
....
....
}
Each set of edit boxes (there are five on the dialog) represents a single record and would like to use the same edit boxes to enter another record until all items are captured. I have an Add Next button, which should store the first record in the array and clear the boxes for another entry when hit, otherwise the OK button is hit. When the OK button is hit, the contents of the array should be retrieved and stored in the database. Now how would i go about storing the information in the array and using the edit boxes again and again. How would the DoDataExchange function look like? Do I need to use a loop to DDX the controls?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.