Skip to content

Instantly share code, notes, and snippets.

@MARSHMALLLOW
Created December 11, 2019 18:59
Show Gist options
  • Save MARSHMALLLOW/13942057d35413af9a12c4f61176dd14 to your computer and use it in GitHub Desktop.
Save MARSHMALLLOW/13942057d35413af9a12c4f61176dd14 to your computer and use it in GitHub Desktop.
#include <Windows.h>
int main() {
HDC hdc = GetDC(HWND_DESKTOP);
int X = GetSystemMetrics(SM_CXSCREEN);
int Y = GetSystemMetrics(SM_CYSCREEN);
while(TRUE)
{
BitBlt(hdc, rand() % (X - 0), rand() % (Y - 0), rand() % (X - 0), rand() % (Y - 0), hdc, rand() % (X - 0), rand() % (Y - 0), SRCCOPY);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment