Not sure if this is much use:-
Basically, you call a WinAPI (GDI) function called UpdateWindow(hWnd), this sends a WM_PAINT event to your call back function, then you can draw your updated window again!
Dabz
LRESULT APIENTRY WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { PAINTSTRUCT ps; HDC hdc; switch (message) { case WM_PAINT: hdc = BeginPaint(hwnd, &ps); TextOut(hdc, 0, 0, "Hello!", 15); EndPaint(hwnd, &ps); return 0L; // Process other messages. } } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HWND hwnd; hwnd = CreateWindowEx( // parameters ); ShowWindow(hwnd, SW_SHOW); UpdateWindow(hwnd); <--- Call this if you want to update your window! return msg.wParam; }
Basically, you call a WinAPI (GDI) function called UpdateWindow(hWnd), this sends a WM_PAINT event to your call back function, then you can draw your updated window again!
Dabz