don't show an empty list when no driver files are required
CORE-3341

svn path=/trunk/; revision=67005
This commit is contained in:
Christoph von Wittich 2015-04-01 12:03:12 +00:00
parent 79ca4fbf90
commit aae247f9ff
3 changed files with 11 additions and 2 deletions

View file

@ -319,6 +319,7 @@ DriverDetailsDlgProc(IN HWND hwndDlg,
{ {
LV_COLUMN lvc; LV_COLUMN lvc;
HWND hDriversListView; HWND hDriversListView;
WCHAR szBuffer[260];
dap = (PDEVADVPROP_INFO)lParam; dap = (PDEVADVPROP_INFO)lParam;
if (dap != NULL) if (dap != NULL)
@ -341,6 +342,13 @@ DriverDetailsDlgProc(IN HWND hwndDlg,
UpdateDriverDetailsDlg(hwndDlg, UpdateDriverDetailsDlg(hwndDlg,
hDriversListView, hDriversListView,
dap); dap);
if (ListView_GetItemCount(hDriversListView) == 0)
{
if(LoadStringW(hDllInstance, IDS_NODRIVERS, szBuffer, _countof(szBuffer)))
MessageBoxW(hwndDlg, szBuffer, dap->szDevName, MB_OK);
EndDialog(hwndDlg, IDCANCEL);
}
} }
Ret = TRUE; Ret = TRUE;

View file

@ -2,6 +2,7 @@
#define __DEVMGR_H #define __DEVMGR_H
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h>
#define WIN32_NO_STATUS #define WIN32_NO_STATUS
#include <windef.h> #include <windef.h>