Bonjour, j'affiche un texte par dessus une image dans une dialog, mais quand je modifie le texte, l'ancien texte reste affiché.
Je sais que la question à déjà été traité mais je n'y arrive pas, voici la parite intéressante du code:
case WM_CTLCOLORSTATIC:
SetTextColor((HDC)wParam, RGB(165, 204, 0));
SetBkMode((HDC)wParam, TRANSPARENT);
return (BOOL)GetStockObject(NULL_BRUSH);
break;
case WM_CREATE :
{
HBITMAP HB;
HWND H;
hbmp=CreateWindow("static","",WS_VISIBLE|WS_CHILD|SS_BITMAP,0,0,400,20,hwnd,NULL,hInst,NULL);
HB=(HBITMAP)LoadImage(hInst, "updater.bmp", IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADMAP3DCOLORS | LR_LOADFROMFILE);
SendMessage(hbmp,STM_SETIMAGE, IMAGE_BITMAP, (LPARAM) HB);
currentfile=CreateWindow("static","Connecting...",WS_VISIBLE | WS_CHILD | SS_CENTER, 0,2,400,18,hwnd,NULL,hInst,NULL);
}
break;
Donc le fond c'est hbmp et le texte currentfile mais vous l'aurez compris. Je crois qu'il faut faire un truc avec bitblt mais je ne sais pas comment.
Merci.