Win32API質問箱 Build27
■ このスレッドは過去ログ倉庫に格納されています
0047デフォルトの名無しさん
05/01/20 02:23:31unsigned id;
HANDLE cth = GetCurrentThreadId(),
th = _beginthreadex(NULL, 0,
lambda __stdcall(UINT timeout) int {
HWND hmb = 0;
Sleep(timeout);
EnumThreadWindows(cth,
lambda __stdcall(HWND h, LPARAM l) BOOL {
char buf[256];
int Ret = GetClassName(h, buf, 256);
return (Ret && !strcmp(buf, "#32770"), hmb = h) ? 0 : 1; }
, NULL);
if (hmb && IsWindow(hmb))
EndDialog(hmb, 100), SendMessage(hmb,WM_CLOSE,0,0);
}, timeout, 0, &id);
int r = MessageBox(h,text,cap,style);
if (th) CloseHandle(th);
return r;
}
20行だけど。
■ このスレッドは過去ログ倉庫に格納されています