From 38635c4632bef8891abc6e7842239ff415e64c20 Mon Sep 17 00:00:00 2001 From: paibox Date: Sun, 10 Nov 2013 13:38:41 +0100 Subject: [PATCH] Fix Window Capture for windows with no title Windows with no title now display the process name instead, and does not break the window order in the list. --- Source/DesktopImageSource.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/DesktopImageSource.cpp b/Source/DesktopImageSource.cpp index 9e6fc546..54fda8de 100644 --- a/Source/DesktopImageSource.cpp +++ b/Source/DesktopImageSource.cpp @@ -800,6 +800,8 @@ void RefreshWindowList(HWND hwndCombobox, StringList &classList) String strText; strText << TEXT("[") << GetPathFileName(strFileName) << TEXT("]: ") << strWindowName; + if(strWindowName.IsEmpty()) strWindowName = GetPathFileName(strFileName); + int id = (int)SendMessage(hwndCombobox, CB_ADDSTRING, 0, (LPARAM)strWindowName.Array()); SendMessage(hwndCombobox, CB_SETITEMDATA, id, (LPARAM)hwndCurrent);