From: Kazuhiro Fujieda Date: Thu, 21 Apr 2011 15:29:41 +0000 (+0900) Subject: CUtils::IsDialog detects a sound box in Internet Explorer isn't a dialog. X-Git-Tag: snap-32bit X-Git-Url: http://git.osdn.net/view?p=xkeymacs%2Fxkeymacs.git;a=commitdiff_plain;h=refs%2Ftags%2Fsnap-32bit CUtils::IsDialog detects a sound box in Internet Explorer isn't a dialog. --- diff --git a/xkeymacsdll/Utils.cpp b/xkeymacsdll/Utils.cpp index ac7ceff..88eabf5 100644 --- a/xkeymacsdll/Utils.cpp +++ b/xkeymacsdll/Utils.cpp @@ -843,6 +843,10 @@ int CUtils::GetClipboardTextLength() BOOL CUtils::IsDialog() { + HWND hwnd = GetForegroundWindow(); + TCHAR szWindowText[0x100] = {'\0'}; + if (!GetWindowText(hwnd, szWindowText, sizeof(szWindowText))) + return FALSE; // inside sound box return GetParent(GetForegroundWindow()) != NULL; }