Bonjour,
je souhaiterais dessiner avec GDI+ dans un control static...
Seulement voila, quand j'essaye de dessiner dans ce control, le control disparait et rien n'est affiché...
Y a-t'il une solution a ce probleme?
Merci d'avance,
Loic
PS : ci dessous les fonctions principales du programmes
---------------------------------------
hSCLRect = CreateWindowEx(
WS_EX_CLIENTEDGE, "STATIC", NULL,
WS_VISIBLE | WS_CHILD | SS_WHITERECT,
0,0,0,0, hWindow, NULL, hInst, NULL);
hDialogBoxes.push_back(hSCLRect);
MoveWindow(hSCLRect,Rect.left+10, Rect.top+10, Rect.right-Rect.left-80, Rect.bottom-Rect.top-60, TRUE);
---------------------------------------
voidPaint()
{
Pen pen(Color(255, 0, 0, 255));
hdc = BeginPaint(hSCLRect, &ps);
Graphics graphics(hdc);
graphics.DrawLine(&pen, 0, 0, 900, 900);
EndPaint(hSCLRect, &ps);
}
---------------------------------------