#include <windows.h>
#include <string.h>

void ShowMyText(HWND);

LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_PAINT:
ShowMyText(hWnd);
break;
default:
return(DefWindowProc(hWnd, msg, wParam, lParam));
}
return (0L);
}

void ShowMyText(HWND hWnd)
{
HDC hdc;
PAINTSTRUCT paint;
LPCSTR str = "HELLO WORLD";

hdc = BeginPaint(hWnd, &paint);
TextOut(hdc, 10, 10, str, lstrlen(str));
EndPaint(hWnd, &paint);
return;
}