Bonjour,
Je cherche a remplir un flexgrid, je n'arrive pas a savoir comment déclarer le type de la variable accrochée a mon flexgrid, elle s'appelle
m_FlexGrid j'éffectue un cast voici mon code :



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
25
 
		// Remplissange du Flexgrid
		// Concaténation text
 
	CMSFlexGrid* m_FlexGrid = 0;
	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<12;j++)
	{
 
		result = result + txt_1 + txt_2;
		m_FlexGrid->SetCol(j);
		m_FlexGrid->AddString(result);	
                }

Cdlt
Philo