OSDN Git Service

CUtils::IsDialog detects a sound box in Internet Explorer isn't a dialog. snap-32bit
authorKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Thu, 21 Apr 2011 15:29:41 +0000 (00:29 +0900)
committerKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Thu, 26 May 2011 23:21:42 +0000 (08:21 +0900)
xkeymacsdll/Utils.cpp

index ac7ceff..88eabf5 100644 (file)
@@ -843,6 +843,10 @@ int CUtils::GetClipboardTextLength()
 \r
 BOOL CUtils::IsDialog()\r
 {\r
+       HWND hwnd = GetForegroundWindow();\r
+       TCHAR szWindowText[0x100] = {'\0'};\r
+       if (!GetWindowText(hwnd, szWindowText, sizeof(szWindowText)))\r
+               return FALSE; // inside sound box\r
        return GetParent(GetForegroundWindow()) != NULL;\r
 }\r
 \r