X-Git-Url: http://git.osdn.net/view?p=xkeymacs%2Fxkeymacs.git;a=blobdiff_plain;f=xkeymacsdll%2FUtils.cpp;h=88eabf572fce4e117c6ef476bbc924ee909d44d7;hp=ac7ceff2ded43078a927399944d0061a78eadb5f;hb=7f7f720f94092269df599cbc81fb5bc84bfa021d;hpb=4e1e5292acb57b89a4a0f4fa8ce9ccb32745d604 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; }