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, 2, RGB( 84, 79, 171)),
- hPen4 = CreatePen(PS_SOLID, 2, RGB(214, 73, 151));
- HDC hdc = GetWindowDC(hWnd);
- SetBkMode(hdc, 1); // TRANSPARENT
- P.X = 100;
- P.Y = 200;
- EXTLOGPEN pINFO;
- GetObject(hPen1, sizeof(EXTLOGPEN), &pINFO);
- SelectObject(hdc, hPen3);
- for(int i = 0; i < 200; i+=20)
- {
- MoveToEx(hdc, 50, 120+i, 0);
- LineTo (hdc, 230, 120+i );
- MoveToEx(hdc, 50+i, 120, 0);
- LineTo (hdc, 50+i, 300 );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement