comment afficher un CString dans une boite de dialog?
bonjour
je veux afficher un string ou bien un tableau de caractére ( par exemple "101101") sur une boite de dialog
j'écris cette fonctin:
Code:
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 26 27 28 29 30 31 32
|
BOOL CImage::CalcMarqueB(CImage& marque,CString strmarq ,int m_hauteur, int m_largeur,double* Rs){
int x,y;
int L=strmarq.GetLength();
int Cmp=0;
double resultat=0;
for( x=0; x<BmSrcInfo->biWidth; x++)
for( y=0; y<BmSrcInfo->biHeight; y++)
{
for (int i=0;i<L;i++)
{
while(Cmp<(i+1)*m_hauteur*m_largeur)
{
if(lpDestBits[y*nScanWidth+x]==255)
resultat+= lpSrcBits[y*nScanWidth+x];
else
resultat-= lpSrcBits[y*nScanWidth+x];
Cmp++;
}
return Cmp;
if( resultat > m_largeur * m_hauteur -50)
Rs[i]=1;
else Rs[i]=0;
}
}
} |
et je fais appeler cette fonction par:
Code:
1 2 3 4 5 6 7 8 9 10
|
void CDTatoSpacBlocDlg::OnDetect()
{
CString strmarq = "1110011";
double* Rs= 0;
m_Image.CalcMarqueB(m_Marque,strmarq,32,32,Rs);
str.Format("Resultat de comptage : %s",Rs);
} |
le probléme que j'ai rencontré c'est que quand je clique sur le boutton teste j'affiche la valeur: Null
moi je veux afficher la chaine "101110" par exemple
est quelqu'un peut m'aider???