Created
September 29, 2019 19:12
-
-
Save MARSHMALLLOW/f0de196b60d62b9fd658503a250471bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
int main() { | |
int inc; | |
int sw = GetSystemMetrics(SM_CXSCREEN); | |
int sh = GetSystemMetrics(SM_CYSCREEN); | |
while(1) | |
{ | |
inc++; | |
int x = rand() % (sw - 0); | |
int w = rand() % (5 - 0); | |
int y = inc; | |
HDC hdc = GetDC(HWND_DESKTOP); | |
BitBlt(hdc, x, y, w, sw, hdc, x, 0, SRCCOPY); | |
Sleep(100); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason it only works if compiled as 64-bit