Close all window examples after enumerating window handles
- 2020-04-02 02:07:10
- OfStack
#include
BOOL CALLBACK EnumWindowsProc(HWND hwnd,LPARAM IParam);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
EnumWindows(EnumWindowsProc,0);//Passes the window handle to the callback function
return 0;
}