Hi All
I have Dialog include 20 pictures, on dialog initializing I try to take them off.
i write this code:
CString tempname, tempnum; // define temporary name and number
char tempvar [10]; // define temporary variable
for (int x=1;x<=20;x++) // x picture location
{
tempname="IDC_"; // IDC_1...IDC_20
itoa(x,tempvar,10); // convert int to char
tempnum=tempvar; // convert char to CString
tempname = tempname + tempnum; // building CStrting include the suitable IDC_: IDC_1 to IDC_20
AfxMessageBox(tempname);
GetDlgItem(tempname)->ShowWindow(false);
my problem is that i do not know how to enter the tempname to the GetDlgItem
i need to enter IDC_1 to ADC_20
how can i do it?
thanks,