int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
hinst=hInstance;
HWND hwnd;
MSG msg;
WNDCLASS w;
memset(&w,0,sizeof(WNDCLASS));
w.style = NULL;
w.lpfnWndProc = WndProc;
w.hInstance = hInstance;
w.hbrBackground = GetStockBrush(WHITE_BRUSH);
w.lpszClassName = "C Windows";
w.hCursor = LoadCursor(NULL,IDC_ARROW);
RegisterClass(&w);
hwnd = CreateWindow(
"C Windows", //class
"C Windows",//name
NULL,//styles
0,0,GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN),//koordinati
NULL,NULL,hInstance,NULL);
ShowWindow(hwnd,nCmdShow);
ShowCursor(FALSE);
UpdateWindow(hwnd);
while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;;
}