MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / EnumDialog

Function EnumDialog

source/window.cpp:1202–1223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1200
1201
1202BOOL CALLBACK EnumDialog(HWND aWnd, LPARAM lParam)
1203// lParam should be a pointer to a ProcessId (ProcessIds are always non-zero?)
1204// To continue enumeration, the function must return TRUE; to stop enumeration, it must return FALSE.
1205{
1206 pid_and_hwnd_type &pah = *(pid_and_hwnd_type *)lParam; // For performance and convenience.
1207 if (!lParam || !pah.pid) return FALSE;
1208 DWORD pid;
1209 GetWindowThreadProcessId(aWnd, &pid);
1210 if (pid == pah.pid)
1211 {
1212 TCHAR buf[32];
1213 GetClassName(aWnd, buf, _countof(buf));
1214 // This is the class name for windows created via MessageBox(), GetOpenFileName(), and probably
1215 // other things that use modal dialogs:
1216 if (!_tcscmp(buf, _T("#32770")))
1217 {
1218 pah.hwnd = aWnd; // An output value for the caller.
1219 return FALSE; // We're done.
1220 }
1221 }
1222 return TRUE; // Keep searching.
1223}
1224
1225
1226

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected