salut
j'ai rencontré un pb lors de l'affichage du nom selectioné d'une liste ds EditBox
voila le code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
:SetCurrentDirectory("c:\\Marques");// on de deplace sur le repertoire à lister
	 CListBox* pMyListBox ;
	 pMyListBox=(CListBox*) GetDlgItem(IDC_MARQUES_CIMAGE);
   	 pMyListBox->ResetContent();
	 pMyListBox->Dir(DDL_READWRITE|DDL_DIRECTORY, _T("*.bmp"));
int n= static_cast< CListBox * >(GetDlgItem(IDC_MARQUES_CIMAGE))->GetCurSel();
 
	if(n!=LB_ERR) static_cast< CListBox * >(GetDlgItem(IDC_MARQUES_CIMAGE))->GetText(n,pMyListBox);
 
 
 
	SetDlgItemText(IDC_NOMMRQ,pMyListBox);
lors de l'excution j'ai obtenue ces 2 erreurs:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
C:\\Demonstration\Dlg.cpp(1017) : error C2664: 'int __thiscall CListBox::GetText(int,char *) const' : cannot convert parameter 2 from 'class CListBox *' to 'char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\\Demonstration\Dlg.cpp(1021) : error C2664: 'SetDlgItemTextA' : cannot convert parameter 2 from 'class CListBox *' to 'const char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
erreur de convesion du type
est ce qq1 pt m'aider
merci d'avance