I am working onskinning my own window, instead of those same old dull regular windows. I made a BMP for the title bar, minimize button, and close button. I need help, though. I try this:
void DrawTBar(HDC hdc)
{
HDC hdcMemory;
hdcMemory = CreateCompatibleDC(hdc);
SelectObject(hdcMemory, dBar);
BitBlt(hdc, tBarX, tBarY, ((514 - 26) - 26) - 26, bm.bmHeight, hdcMemory, 0, 0, SRCPAINT);
DeleteDC(hdcMemory);
}
void DrawMBtn(HDC hdc)
{
HDC hdcMemory;
hdcMemory = CreateCompatibleDC(hdc);
SelectObject(hdcMemory, dBar);
BitBlt(hdc, mnX, mnY, mn.bmWidth, mn.bmHeight, hdcMemory, 0, 0, SRCPAINT);
DeleteDC(hdcMemory);
}
void DrawCBtn(HDC hdc)
{
HDC hdcMemory;
hdcMemory = CreateCompatibleDC(hdc);
SelectObject(hdcMemory, dBar);
BitBlt(hdc, csX, csY, cs.bmWidth, cs.bmHeight, hdcMemory, 0, 0, SRCPAINT);
DeleteDC(hdcMemory);
}
Then in WM_PAINT:
case WM_PAINT:
PAINTSTRUCT ps;
PAINTSTRUCT ps2;
PAINTSTRUCT ps3;
HDC hdcWindow;
HDC hdc2;
HDC hdc3;
hdcWindow = BeginPaint(hwnd, &ps);
DrawTBar(hdcWindow);
EndPaint(hwnd, &ps);
hdc2 = BeginPaint(hwnd, &ps2);
DrawMBtn(hdc2);
EndPaint(hwnd, &ps2);
hdc3 = BeginPaint(hwnd, &ps3);
DrawCBtn(hdc3);
EndPaint(hwnd, &ps3);
break;
It only loads the title bar image. How do I load multiple bitmaps?