Scopul lucrarii: De studiat primitivele oferite de interfata GDI Codul sursa: #include #include #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); /* GLOBALS */ int X=150,Y=450; float t1=0, t2=0, t3=0; POINT coords[4], pt_arr[8]; HBRUSH hRedBrush, hBlueBrush, hGreenBrush, hRandBrush; /***********/ void ShowCar(HDC); int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrevInst,PSTR szCmdLine,int iCmdShow) { char szClassName[]="myclass"; char szWindowName[]="Dragosh Unknow Planet Sistem"; HWND hwnd; MSG msg; WNDCLASS wc; memset(&wc,0,sizeof(wc)); wc.style= CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc= WndProc; wc.hInstance= hInst; wc.hbrBackground= CreateSolidBrush(RGB(230, 230, 230)); wc.lpszClassName= szClassName; RegisterClass(&wc); hwnd=CreateWindow( szClassName, szWindowName, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 1024, 768, NULL, NULL, hInst, NULL ); ShowWindow(hwnd,SW_SHOWNORMAL); while(GetMessage(&msg,NULL,0,0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return 0; } LRESULT CALLBACK WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) { switch(msg){
Comentariul tau va fi primul
Laborator: Programarea in windows Obiect: Programarea in windows