Check in the 'Win32 resources' tutorials at the top of this forum's listings or Get right into msdn starting here: http://msdn2.microsoft.com/en-us/library/aa383750.aspx and work you way down to: 'A Generic Sample Application'
int __stdcall WinMain(HINSTANCE hHinstance,HINSTANCE hPrevInstance, LPSTR lpStr,int nShowCmd) { WNDCLASSEX wcex; MSG msg; //fill every wcex data individually .... .... .... RegisterClassEx(&wcex); ghwnd = CreateWindow(.....); ShowWindow(..); UpdateWindow(...); while(GetMessage(&msg,0,0,0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam; } LPRESULT __stdcall WndClass(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_CLOSE: PostQuiteMessage(0); return 0; } retunr DefWindowProc(hWnd,msg,wParam, lParam); } this is the simplest window