Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <windows.h>
- HWND hWnd = GetForegroundWindow();
- HDC hdc = GetWindowDC(hWnd);
- COORD P = { 0 };
- HPEN hPen1 = CreatePen(PS_SOLID, 2, RGB(255, 0, 0)),
- hPen2 = CreatePen(PS_SOLID, 7, RGB( 25, 220, 0)),
- hPen3 = CreatePen(PS_SOLID, 2, RGB( 84, 79, 171)),
- hPen4 = CreatePen(PS_SOLID, 2, RGB(214, 73, 151));
- void foo(int x, int y);
- ////////////////////////////////////////////////////////////////////////////////
- int main() //
- {
- RECT pRECT = { 0 };
- GetClientRect(hWnd, &pRECT);
- HDC hdc = GetWindowDC(hWnd);
- SetBkMode(hdc, 1); // TRANSPARENT
- EXTLOGPEN pINFO;
- GetObject(hPen1, sizeof(EXTLOGPEN), &pINFO);
- SelectObject(hdc, hPen3);
- for (int i = 0; i < 200; i +=30)
- {
- MoveToEx(hdc, 50, 120 + i, 0);
- LineTo(hdc, 230, 120 + i);
- MoveToEx(hdc, 50 + i, 120, 0);
- LineTo(hdc, 50 + i, 300);
- Sleep(1000);
- }
- for(int i = 1; i < 7; i++)
- {
- Sleep(100);
- foo(i, i);
- }
- for(int i = 1; i < 7; i++)
- {
- Sleep(100);
- foo(1, i);
- }
- }
- ////////////////////////////////////////////////////////
- void foo(int x, int y)
- {
- SelectObject(hdc, hPen1);
- P.X = 35 + (y*30);
- P.Y = 105 + (x*30);
- Ellipse(hdc,
- P.X - 5,
- P.Y + 5,
- P.X + 5,
- P.Y - 5);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement