sakiir

Black Hole

Oct 30th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.70 KB | None | 0 0
  1. #include <windows.h>
  2.  
  3. int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
  4. {
  5.     HDC hDC = CreateDC(TEXT("DISPLAY"), NULL, NULL, NULL);
  6.     POINT pCurPos;
  7.     RECT rRect;
  8.     HBRUSH hBrush = (HBRUSH)(CreateSolidBrush(RGB(0, 0, 0)));
  9.     int iConst = 1;
  10.  
  11.     while (1)
  12.     {
  13.         if (GetAsyncKeyState(VK_ESCAPE) != 0)
  14.             break;
  15.         iConst += 3;
  16.         GetCursorPos(&pCurPos);
  17.         rRect.left = pCurPos.x - iConst;
  18.         rRect.top = pCurPos.y - iConst;
  19.         rRect.right = pCurPos.x + iConst;
  20.         rRect.bottom = pCurPos.y + iConst;
  21.         FillRect(hDC, &rRect, hBrush);
  22.     }
  23.  
  24.     DeleteDC(hDC);
  25.     return EXIT_SUCCESS;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment