For a windows program i'm making I need to get mutliple strings printed on the screen.
Just wondering is there was an easier way then double BeginPain()
Code:LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { PAINTSTRUCT paintStruct; char string[] = "Testing"; char string1[] = "Testing Two"; HDC hDC; switch (message) { case WM_CLOSE: PostQuitMessage(0); return 0; break; case WM_PAINT: hDC = BeginPaint(hwnd, &paintStruct); SetTextColor(hDC, COLORREF(0x0000FF)); TextOut(hDC, 150, 150, string, sizeof(string)-1); EndPaint(hwnd, &paintStruct); hDC = BeginPaint(hwnd, &paintStruct); SetTextColor(hDC, COLORREF(0xFF0000)); TextOut(hDC, 150, 200, string1, sizeof(string)-1); EndPaint(hwnd, &paintStruct); return 0; break; default: break; } return (DefWindowProc(hwnd, message, wParam, lParam)); }



LinkBack URL
About LinkBacks


