Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PAINTSTRUCT ps;
- HDC hdcOkno;
- hdcOkno = GetDC ( hwnd );
- POINT stary_punkt;
- HPEN CzerwonePioro;
- HPEN BialePioro;
- HPEN CzarnePioro;
- HPEN Wykres;
- HPEN Wykres2;
- HPEN Wykres3;
- RECT rect;
- HFONT hFont;
- int x=320;
- int y=270;
- switch (message) /* handle the messages */
- {
- case WM_PAINT:
- {
- hdcOkno = BeginPaint(hwnd, &ps);
- CzarnePioro = CreatePen( PS_SOLID, 3, 0x000000 );
- SelectObject( hdcOkno, CzarnePioro );
- MoveToEx( hdcOkno, 300, 30, & stary_punkt );
- LineTo( hdcOkno, 300,300 ); //pierwsze musi byc pixel wiecej a przynajmniej tak pisalo w tutorialu lol
- MoveToEx( hdcOkno, 290, 290, & stary_punkt );
- LineTo( hdcOkno, 560,290);
- CzerwonePioro = CreatePen( PS_SOLID, 3, 0xFF0000 );
- hFont = CreateFont(20,0,0,0,FW_DONTCARE,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_OUTLINE_PRECIS,
- CLIP_DEFAULT_PRECIS,CLEARTYPE_QUALITY, VARIABLE_PITCH,TEXT("Impact"));
- SelectObject(hdcOkno , hFont);
- SetRect(&rect, 250,20,0,0);
- SetTextColor(hdcOkno, RGB(0,0,0));
- DrawText(hdcOkno, TEXT("2600"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,40,0,0);
- DrawText(hdcOkno, TEXT("2400"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,60,0,0);
- DrawText(hdcOkno, TEXT("2200"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,80,0,0);
- DrawText(hdcOkno, TEXT("2000"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,100,0,0);
- DrawText(hdcOkno, TEXT("1800"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,120,0,0);
- DrawText(hdcOkno, TEXT("1600"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,140,0,0);
- DrawText(hdcOkno, TEXT("1400"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,160,0,0);
- DrawText(hdcOkno, TEXT("1200"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,180,0,0);
- DrawText(hdcOkno, TEXT("1000"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,200,0,0);
- DrawText(hdcOkno, TEXT("800"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,220,0,0);
- DrawText(hdcOkno, TEXT("600"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,240,0,0);
- DrawText(hdcOkno, TEXT("400"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 250,260,0,0);
- DrawText(hdcOkno, TEXT("200"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 315,300,0,0);
- DrawText(hdcOkno, TEXT("2"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 335,300,0,0);
- DrawText(hdcOkno, TEXT("4"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 355,300,0,0);
- DrawText(hdcOkno, TEXT("6"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 375,300,0,0);
- DrawText(hdcOkno, TEXT("8"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 395,300,0,0);
- DrawText(hdcOkno, TEXT("10"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 415,300,0,0);
- DrawText(hdcOkno, TEXT("12"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 435,300,0,0);
- DrawText(hdcOkno, TEXT("14"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 455,300,0,0);
- DrawText(hdcOkno, TEXT("16"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 475,300,0,0);
- DrawText(hdcOkno, TEXT("18"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 495,300,0,0);
- DrawText(hdcOkno, TEXT("20"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 515,300,0,0);
- DrawText(hdcOkno, TEXT("22"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 535,300,0,0);
- DrawText(hdcOkno, TEXT("24"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 555,300,0,0);
- DrawText(hdcOkno, TEXT("26"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 30,150,0,0);
- DrawText(hdcOkno, TEXT("m :"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 30,190,0,0);
- DrawText(hdcOkno, TEXT("g :"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 30,230,0,0);
- DrawText(hdcOkno, TEXT("a :"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 30,270,0,0);
- DrawText(hdcOkno, TEXT("F :"), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 220,130,0,0);
- DrawText(hdcOkno, TEXT("F[N] "), -1,&rect, DT_NOCLIP);
- SetRect(&rect, 400,330,0,0);
- DrawText(hdcOkno, TEXT("a[m/s^2] "), -1,&rect, DT_NOCLIP);
- ReleaseDC( hwnd, hdcOkno );
- EndPaint(hwnd, &ps);
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement