| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 
 | 
Dans MonObjetPrincipalDlg.h
...
public:
	CListCtrl m_list;
...
Dans MonObjetPrincipalDlg.cpp
...
void MonObjetPrincipalDlg::OnInitDialog()
{
...
	//Ajoute les 3colones
	m_list.InsertColumn(0, _T("Nom Pc"), LVCFMT_LEFT, 125, 0);
	m_list.InsertColumn(1, _T("IP"), LVCFMT_LEFT, 80, 0);
	m_list.InsertColumn(2, _T("Ping"), LVCFMT_LEFT, 39, 0);
	m_list.SetExtendedStyle(LVS_EX_FULLROWSELECT);
	//Ajoute dans la liste ( exemple) 
	int ind = m_list.InsertItem(0,_T("Tosqualler"));
	m_list.SetItem(ind,1,LVIF_TEXT, "127.0.0.1",0,0,0,0);
	m_list.SetItem(ind,2,LVIF_TEXT, "10",0,0,0,0);
...
}
...
Dans Serveur.cpp
UINT TServeur::ThreadClient(LPVOID sock) // Gère les clients
{
...
	//Ce que j'aimerais faire mais evidement m_list undeclared identifier, logique :s
	int ind = m_list->InsertItem(0,_T("Tosqualler"));
	m_list->SetItem(ind,1,LVIF_TEXT, "127.0.0.1",0,0,0,0);
	m_list->SetItem(ind,2,LVIF_TEXT, "10",0,0,0,0);
...
} | 
Partager