上次那个,别人没兴趣
就关了——
但这款2.0版本的
start坑人,变得更强大了
它封锁了最小化建
和关闭键
而且Alt+F4
也是没用的
(一定要看到最后)
好了可以上代码了
#include<bits/stdc++.h>
#include <stdio.h>
#include <windows.h>
using namespace std;
int main(int argc, char* argv[])
{
HWND hwnd = GetConsoleWindow();
HMENU hmenu = GetSystemMenu(hwnd, false);
RemoveMenu(hmenu, SC_CLOSE, MF_BYCOMMAND);
LONG style = GetWindowLong(hwnd, GWL_STYLE);
style &= ~(WS_MINIMIZEBOX);
SetWindowLong(hwnd, GWL_STYLE, style);
SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
ShowWindow(hwnd, SW_SHOWNORMAL);
DestroyMenu(hmenu);
ReleaseDC(hwnd, NULL);
for(;;)
{
system("cls");
cout<<"输出多少个?:"<<" ";
int a;
cin>>a;
if(a>0)
{
cout<<"好的,正在处理!";
}
else
{
cin>>a;
cin.clear();
cin.ignore();
continue;
}
for(int j=1;j<=a;j++)
{
system("start");
}
system("pause");
}
return 0;
}
悄悄告诉你
它的弱点是
从任务栏关闭!