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.
This commit is contained in:
paibox 2013-11-10 13:38:41 +01:00
parent a9fc361ab1
commit 38635c4632

View File

@ -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);