LRESULT CALLBACK printout(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { HDC hdc; static PAINTSTRUCT paint; static RECT textbox; static LPCTSTR blah = "this is a test"; switch(msg) { case WM_CLOSE: { DestroyWindow(hwnd); break; } case WM_DESTROY: { PostQuitMessage(0); break; } case WM_PAINT: { hdc = BeginPaint(hwnd, &paint); SetRect(&textbox, 20, 20, 300, 60); DrawText(hdc, blah, sizeof(blah), &textbox, DT_VCENTER); EndPaint(hwnd, &paint); } default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0; }
sizeof
blah
strlen
std:string
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)