bonjour, depuis un moment je parcours tous les sites internet et je modifie mon code en consequence, mais cela ne marche toujours pas.
voici le code :
VOID DoPaint(HWND hwnd)
{
// dxCard et dyCard sont des variables globales
PAINTSTRUCT ps;
HDC hdc;
HDC hMemDC;
HBITMAP off;
int dwWidth, dwHeight;
RECT rTemp;
BeginPaint(hwnd, &ps);
// dimension de la zone client
dwWidth = GetDeviceCaps(hdc, HORZRES);
dwHeight = GetDeviceCaps(hdc, VERTRES);
hdc = GetDC(hwnd);
hMemDC = CreateCompatibleDC(hdc);
// create the off buffer
off = CreateCompatibleBitmap(hdc, dwWidth, dwHeight);
SelectObject(hMemDC, off);
rTemp.top = dyCard/3;
rTemp.left = dxCard*4 + (dxCard - dyCard/3)/2;
rTemp.right = dxCard*4 + dyCard/3 + (dxCard-dyCard/3)/2;
rTemp.bottom = dyCard - dyCard/3;
DrawEdge(hMemDC,
&rTemp, BDR_RAISEDOUTER, BF_RECT);
// copie de hdc
BitBlt(hdc, //hdc destination
0, //pos x en haut a gauche pour hdc destination
0, //pos y en haut a gauche pour hdc destination
dwWidth, //largeur
dwHeight, //hauteur
hMemDC, //hdc source
0, //pos x en haut a gauche pour hdc source
0, //pos y en haut a gauche pour hdc source
SRCCOPY); //tag de copy
DeleteDC(hMemDC);
EndPaint(hwnd, &ps);
}
drawEdge ne veut pas s'afficher pourtant si je remplace hMemDC par hdc dans la fonction, il s'affiche
quelqu'un pourrait-il me conseiller?