Ver código fonte

fixed issue with getting the currently focused window when not using the hook dll, updated italiano language file

git-svn-id: svn://svn.code.sf.net/p/ditto-cp/code/trunk@438 595ec19a-5cb4-439b-94a8-42fb3063c22c
sabrogden 17 anos atrás
pai
commit
418162deaa
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      CP_Main.cpp

+ 4 - 1
CP_Main.cpp

@@ -390,7 +390,10 @@ bool CCP_MainApp::TargetActiveWindow()
 	DWORD OtherThreadID = GetWindowThreadProcessId(hNew, NULL);
 	if(GetGUIThreadInfo(OtherThreadID, &guiThreadInfo))
 	{
-		hNew = guiThreadInfo.hwndFocus;
+		if(guiThreadInfo.hwndFocus != NULL)
+		{
+			hNew = guiThreadInfo.hwndFocus;
+		}
 	}
 
 	if(hNew == m_hTargetWnd || !::IsWindow(hNew) || IsAppWnd(hNew))