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;
HWND hDriversListView;
WCHAR szBuffer[260];
dap = (PDEVADVPROP_INFO)lParam;
if (dap != NULL)
@ -341,6 +342,13 @@ DriverDetailsDlgProc(IN HWND hwndDlg,
UpdateDriverDetailsDlg(hwndDlg,
hDriversListView,
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;

View file

@ -962,8 +962,8 @@ HardwareDlgProc(IN HWND hwndDlg,
case WM_DESTROY:
{
/* zero hpd pointer in window data, because it can be used later (WM_DESTROY has not to be last message) */
SetWindowLongPtr(hwndDlg, DWL_USER, (DWORD_PTR)NULL);
/* zero hpd pointer in window data, because it can be used later (WM_DESTROY has not to be last message) */
SetWindowLongPtr(hwndDlg, DWL_USER, (DWORD_PTR)NULL);
/* free devices list */
FreeDevicesList(hpd);

View file

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