OSDN Git Service

CUtils::IsDialog detects a sound box in Internet Explorer isn't a dialog.
[xkeymacs/xkeymacs.git] / 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