bouton et bitmap - a pas tout compris
Je viens de lire les différents sujets traitant de l'affichage d'un bitmap sur un CBitmapButton et après avoir adapté les diverses solutions à mon problème, ça me donne un bouton vierge...
Voilà la fonction qui me permet d'acquérir mon image puis de l'afficher
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
void OnButton2() {
NomBmp=CheminEnregistrement;
NomBmp=CheminEnregistrement+".bmp";
m_num.Format("Acquisition en cours");
UpdateData(FALSE);
_GetImage();
m_num.Format("Recherche du centre morphologique...");
m_msg.Format("");
UpdateData(FALSE);
_SearchMorphoCentre();
hBitmap = (HBITMAP)::LoadImage(NULL,NomBmp, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE|LR_CREATEDIBSECTION);
if (hBitmap == NULL){
m_msg.Format("Erreur de chargement de l'image");
}else{
BoutonAvecPict.SetBitmap(hBitmap);
m_VisuDoigt.ShowWindow(SW_HIDE);
m_start.ShowWindow(SW_HIDE);
BoutonAvecPict.ShowWindow(SW_SHOW);
}
} |
Si quelqu'un pouvait me donner un indice sur la raison pour laquelle ça n'affiche rien...