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 33 34 35 36
|
void CDTatoSpacBlocDlg::OnDetect()
{
// TODO: Add your control notification handler code here
CString str;
int nindex = m_mfiles.GetCurSel();
if((nindex != LB_ERR)) m_mfiles.GetText( nindex,str );
str = m_pParent->m_repApp+"Marques\\"+str;
m_Marque.LoadFile(str);
if((m_Marque.GetWidth() < m_Image.GetWidth())&&(m_Marque.GetHeight() < m_Image.GetHeight())){
//Rs est un tableau où il faut récuperer les valeurs calculées sur chaque bloc
// CString Rs="";
// m_Image.CalcMarqueB(m_Marque,Rs);
CString strmarq = "1110011";
char Rs[]= " 0000000";
int m_hauteur=24; // la taille du marque en generale
int m_largeur=24;
m_Image.CalcMarqueB(m_Marque,strmarq,m_hauteur,m_largeur,Rs);
str.Format("Resultat de comptage : %s",Rs);
m_Rs = str;
UpdateData(FALSE);
}
else AfxMessageBox("Dimensions non identiques ... ");
} |
Partager