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