想恶作剧的请看过来

想搞恶作剧的请看过来, ,运行本源代码之后,你的电脑屏幕上会出现难以想象的效果,至于什么效果请自己尝试,呵呵,谢绝老爷机尝试,否则一切后果概不负责。 ;欢迎各位吃螃蟹的附上效果图.....

建议:
1、交c/c++作业的时候,把这个编译成dll,运行真正的程序前调用一下;(请估摸着老师的脾气来,让老师把电脑砸了就不好了)
2、寝室的朋友啊,班上的同学啊,每个人电脑上给他安上一个,没事的时候,嗯,忽悠一下他的眼睛;(当然,游戏的时候别打扰,不然有人会抓狂的)
3、看其人极其不顺眼的,好办!让程序不停的运行下去(可以考虑搞两个进程,一个运行,一个监视是否运行,没如果停了,另一个重新启动运行进程),如果再恶劣一点,神啊,你就给他在开机自启动上添加上你的程序吧。阿门!(慎用,极其毒辣!)

保证:
1、绝对没有病毒,木马;
2、绝对不会伤害计算机;
3、相信,只要有耐心,一切都会结束的;

代码如下:

  1  #include  < windows.h >
  2 
  3  //  Function prototypes
  4  void  change_hor_screen( int );
  5  void  change_ver_screen( int );
  6  void  prepare_screen();
  7  void  horizontal_flipped();
  8  void  vertical_flipped();
  9 
 10  int  dcHorzres;   //  HORZRES
 11  int  dcVertres;   //  VERTRES
 12  HDC hDC;
 13  HDC hMemoryDC;
 14  HBITMAP hBitmap;
 15 
 16  void  change_hor_screen( int  x)
 17  {
 18    int  width;
 19    int  height;
 20    int  result;
 21 
 22   width  =  dcHorzres;
 23   height  =  dcVertres;
 24   result  =  width  -  x;
 25 
 26   x   =  ((width  +  x ) %  width)  %  width;
 27   BitBlt(hDC, x,  0 , width  -  x, height, hMemoryDC,  0 0 , SRCCOPY);
 28   BitBlt(hDC,  0 0 , x, height, hMemoryDC, width  -  x,  0 , SRCCOPY);
 29    return ;
 30  }
 31 
 32  void  change_ver_screen( int  y)
 33  {
 34    int  width;
 35    int  height;
 36 
 37   width  =  dcHorzres;
 38   height  =  dcVertres;
 39 
 40   y   =  ((width  +  y)  %  width)  %  width;
 41   BitBlt(hDC,  0 , y, width, height - y, hMemoryDC,  0 0 , SRCCOPY);
 42   BitBlt(hDC,  0 0 , width, y, hMemoryDC,  0  , height  -  y, SRCCOPY);
 43    return ;
 44 
 45 
 46  void  prepare_screen()
 47  {
 48   hDC    =  GetDC(NULL);
 49   dcHorzres  =  GetDeviceCaps(hDC, HORZRES);
 50   dcVertres  =  GetDeviceCaps(hDC, VERTRES);
 51   hMemoryDC  =  CreateCompatibleDC(hDC);
 52   hBitmap   =  CreateCompatibleBitmap(hDC, dcHorzres, dcVertres);
 53   SelectObject(hMemoryDC, hBitmap);
 54   BitBlt(hMemoryDC,  0 0 , dcHorzres, dcVertres, hDC,  0 0 , SRCCOPY);
 55   
 56    return ;
 57  }
 58 
 59  void  horizontal_flipped()
 60  {
 61    int  constant  =   1 ;     
 62    int  counter   =   0 ;    
 63    int  v9    =   0 ;
 64    int  v11    =   0 ;
 65    int  width;
 66    int  height;
 67 
 68   width  =  dcHorzres;
 69   height  =  dcVertres;
 70 
 71    while (counter  <   200 )
 72   {
 73    change_hor_screen(constant  *  counter  *  counter);
 74    Sleep( 30 );
 75    counter ++ ;
 76   }
 77   
 78   v9   =  (counter  *  counter  *  constant)  %  width;
 79   v11   =  counter  *   2   *  constant;
 80   counter  =   0 ;
 81    while (counter  <   200 )
 82   {
 83    change_hor_screen((counter  *  v11  +  v9)  -  (counter  *  counter  *  constant));
 84    Sleep( 30 );
 85    counter ++ ;
 86   }
 87 
 88   v9   =  ((counter  *  v11  +  v9)  -  (counter  *  counter  *  constant))  %  width;
 89   v11   =   0 ;
 90   counter  =   0 ;
 91    while (counter  <   200 )
 92   {
 93    change_hor_screen(v9  -  counter  *  counter  *  constant);
 94    Sleep( 30 );
 95    counter ++ ;
 96   }
 97 
 98   v9   =  (v9  -  counter  *  counter  *  constant)  %  width;
 99   v11   =  counter  *   - 2   *  constant;
100   counter  =   0 ;
101    while (counter  <   200 )
102   {
103    change_hor_screen(counter  *  counter  *  constant  +  counter  *  v11  +  v9);
104    Sleep( 30 );
105    counter ++ ;
106   }
107 
108    return ;
109  }
110 
111  void  vertical_flipped()
112  {
113 
114    int  constant  =   1 ;     
115    int  counter   =   0 ;    
116    int  v9    =   0 ;
117    int  v11    =   0 ;
118    int  width;
119    int  height;
120 
121   width  =  dcHorzres;
122   height  =  dcVertres;
123 
124    while (counter  <   200 )
125   {
126    change_ver_screen(constant * counter * counter);
127    Sleep( 30 );
128    counter ++ ;
129   }
130   
131   v9   =  (counter * counter * constant) % width;
132   v11   =  counter  *   2   *  constant;
133   counter  =   0 ;
134    while (counter  <   200 )
135   {
136    change_ver_screen((counter  *  v11  +  v9)  -  (counter  *  counter  *  constant));
137    Sleep( 30 );
138    counter ++ ;
139   }
140 
141   v9   =  ((counter  *  v11  +  v9)  -  (counter  *  counter  *  constant))  %  width;
142   v11   =   0 ;
143   counter  =   0 ;
144    while (counter  <   200 )
145   {
146    change_ver_screen(v9  -  counter  *  counter  *  constant);
147    Sleep( 30 );
148    counter ++ ;
149   }
150 
151   v9   =  (v9  -  counter  *  counter  *  constant)  %  width;
152   v11   =  counter  *   - 2   *  constant;
153   counter  =   0 ;
154    while (counter  <   200 )
155   {
156    change_ver_screen(counter  *  counter  *  constant  +  counter  *  v11  +  v9);
157    Sleep( 30 );
158    counter ++ ;
159   }
160 
161    return ;
162  }
163  int  main()
164  {
165 
166   Sleep( 30 );
167   prepare_screen();
168   horizontal_flipped();
169   vertical_flipped();
170   
171    //  Restore the screen
172   BitBlt(hDC,  0 0 , dcHorzres, dcVertres, hMemoryDC,  0 0 , SRCCOPY);
173   SelectObject(hDC, hBitmap);
174   DeleteDC(hDC);
175   DeleteDC(hMemoryDC);
176    return   0 ;
177  }


转载于:https://www.cnblogs.com/hanyulcf/archive/2009/07/31/1535687.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值