Bonjour a tous,
je recherche des infos pour remplir un MSFlexGrid en utilisant des variables CString, j'ai fait un static_cast comme pour une ListBox,
Mais le compilateur me retourne des erreurs!


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
	CMSFlexGrid* m_FlexGrid = static_cast<CMSFlexGrid*>(GetDlgItem(IDC_MSFLEXGRID));
	CString result;
	CString txt_1;
	CString txt_2;
 
	m_FlexGrid->Clear();
    m_FlexGrid->SetRows(2);
    m_FlexGrid->SetFormatString("nom|prenom|adresse");
 
	GetDlgItem(IDC_EDIT1)->GetWindowText(txt_1);
	GetDlgItem(IDC_EDIT2)->GetWindowText(txt_2);
 
	result = "";
	for (int j = 0;j<5;j++)
	{
 
		result = result + txt_1 + txt_2;
 
                m_FlexGrid->SetCol(j);
		m_FlexGrid->AddString(result);		
 
 
	}

CDLT
Philo