Hallo,
ich erstelle text labels über:
Code:
HWND CreateLabel(int index,char* Name,int x,int y)
{
return CreateWindow(TEXT("static"), Name, WS_VISIBLE | WS_CHILD, x, y, 490, 15, hwnd, (HMENU) index, NULL, NULL);
}
Nun setze ich später mehrmals einen anderen text sprich die labels verändern sich mit
Code:
SetWindowText(Label2,"Test 1");
später zb
SetWindowText(Label2,"Hallo");
Das problem ist nun das sich die labels überlappen sprich der vorherige text wird nicht "weg gemacht" wie mache ich das ?
!!! Wen ich den code um die background color zu machen entferne funktioniert es dan ist aber der bg halt nen transparent
Code:
case WM_CTLCOLORSTATIC:
/*
if ( GetDlgItem(hwnd, 3) == (HWND)lParam)
{
SetBkMode( (HDC)wParam, TRANSPARENT);
SetTextColor((HDC)wParam, RGB(255,0,0));
return (BOOL) GetStockObject(HOLLOW_BRUSH);
}
if ( GetDlgItem(hwnd, 4) == (HWND)lParam)
{
SetBkMode( (HDC)wParam, TRANSPARENT);
SetTextColor((HDC)wParam, RGB(255,0,0));
return (BOOL) GetStockObject(HOLLOW_BRUSH);
}*/
2:
Ich will eine bitmap aus der resource laden siehe:
Warum geht das nicht ?
Der name stimmt doch ?