Return DefWindowProc(hWnd, message, wParam, lParam) Wcex.hbrBackground = (HBRUSH) CreateSolidBrush(RGB(255, 0, 0)) Īnd then add a WM_ERASEBKGND with a Sleep to the WndProc: case WM_PAINT: The only thing you have to do, after creating a "new Win32 Project", is change the background color of the window class, e.g., to the color red: //wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1) At least this is the case for me when running under Windows 10,21H1 (in VS2008 & VS2013). Now, I just noticed that this problem is also present in the default sample app created by Visual Studio. ![]() I was looking into why when running my Windows App, it has a short flash of white background before rendering the actual app (i.e., before WM_ERASEBKGND and WM_PAINT is received).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |