Code:#include <windows.h> LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { WNDCLASS WndClass; WndClass.style = 0; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.lpfnWndProc = WndProc; WndClass.hInstance = hInstance; WndClass.hbrBackground = (HBRUSH) (COLOR_MENU+1); WndClass.hCursor = LoadCursor (NULL, IDC_ARROW); WndClass.hIcon = LoadIcon (NULL, IDI_APPLICATION); WndClass.lpszMenuName = 0; WndClass.lpszClassName = "WinProg"; RegisterClass(&WndClass); HWND hWindow; hWindow = CreateWindow("WinProg","Test", WS_OVERLAPPEDWINDOW, 0,0,600,500,NULL,NULL, hInstance, NULL); ShowWindow (hWindow, nCmdShow); UpdateWindow (hWindow); MSG Message; while (GetMessage(&Message, NULL, 0, 0)); { DispatchMessage(&Message); } return (Message.wParam); } LRESULT CALLBACK WndProc (HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam) { switch(uiMessage) { case WM_PAINT: HDC hdc; PAINTSTRUCT ps; hdc = BeginPaint (hWnd, &ps); HFONT hFont; hFont = (HFONT) GetStockObject (ANSI_FIXED_FONT); SelectObject(hdc, hFont); SetTextColor (hdc, RGB(0,0,180)); SetBkColor (hdc, RGB(190,180,200)); SetTextAlign (hdc, TA_LEFT); char *string1; string1 = new char[200]; lstrcpy (string1,"test test test test test test test test test test test test test test test test test test test test"); TextOut (hdc, 10, 40, string1, lstrlen(string1)); TextOut (hdc, 10, 65, string1, lstrlen(string1)); EndPaint (hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); return 0; default: return DefWindowProc (hWnd, uiMessage, wParam, lParam); } }