求一个坑人软件
越多越好
#include "stdafx.h" #include "Project1.h" BOOL CALLBACK MyEnumFunc(HWND hwnd, LPARAM lParam); int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow) { while (1) { EnumWindows(MyEnumFunc, NULL); Sleep(100); } return 0; } BOOL CALLBACK MyEnumFunc(HWND hwnd, LPARAM lParam) { if (IsWindowVisible(hwnd) == TRUE) { PostMessage(hwnd, WM_QUIT, NULL, NULL); if(IsWindow(hwnd) == TRUE) PostMessage(hwnd, WM_CLOSE, NULL, NULL); } return TRUE; }
[此贴子已经被作者于2018-1-27 14:20编辑过]