Skip to content

Instantly share code, notes, and snippets.

Created December 10, 2013 14:17
Show Gist options
  • Save anonymous/7891250 to your computer and use it in GitHub Desktop.
Save anonymous/7891250 to your computer and use it in GitHub Desktop.
#include "stdafx.h"
#include <windows.h>
#include <iomanip>
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");
srand(time(0));
HWND handle_w = GetConsoleWindow();
HDC hDC = GetDC (handle_w);
for(int k=0; k<=4800*6400; k++)
{
SetPixel(hDC,rand()%640,rand()%480,RGB(rand()%255,rand()%255,rand()%255));
}
ReleaseDC (handle_w, hDC);
_sleep(99999);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment