1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow)
{
wc.style = CS_OWNDC;
wc.lpfnWndProc = WindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = "OGL";
RegisterClass(&wc);
hWnd = CreateWindow ("OGL", "Balles dans l'espace",WS_CAPTION|WS_POPUPWINDOW | WS_VISIBLE, 0, 0, 800, 600, NULL, NULL,hInstance, NULL);
SetTimer (hWnd,1,10,NULL);
while (GetMessage(&msg, NULL, 0, 0) && !touches[VK_ESCAPE])
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
KillTimer (hWnd,1);
return 0;
} |
Partager