[DXDIAG] Rename WIDTH, HEIGHT, InitListViewColumns and SetDeviceDetails. Zap WindowPr...
[reactos.git] / base / applications / dxdiag / input.c
index 03d238a..2e8ebf3 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "precomp.h"
+
 #include <dinput.h>
 
 typedef struct
@@ -150,7 +151,7 @@ BOOL CALLBACK DirectInputEnumDevCb(
 }
 
 VOID
-InitListViewColumns(PINPUT_DIALOG_CONTEXT pContext)
+InputPageInitListViewColumns(PINPUT_DIALOG_CONTEXT pContext)
 {
     WCHAR szText[256];
     LVCOLUMNW lvcolumn;
@@ -159,6 +160,10 @@ InitListViewColumns(PINPUT_DIALOG_CONTEXT pContext)
 
     pContext->hDevList = GetDlgItem(pContext->hwndDlg, IDC_LIST_DEVICE);
 
+    /* Highlights the entire row instead of just the selected item in the first column.
+       This increases readability on the selected item in the list. */
+    SendMessage(pContext->hDevList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
+
     ZeroMemory(&lvcolumn, sizeof(LVCOLUMNW));
     lvcolumn.pszText = szText;
     lvcolumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH;
@@ -190,7 +195,7 @@ InitializeDirectInputDialog(HWND hwndDlg)
     ZeroMemory(&Context, sizeof(Context));
     Context.pObj = pObj;
     Context.hwndDlg = hwndDlg;
-    InitListViewColumns(&Context);
+    InputPageInitListViewColumns(&Context);
     pObj->lpVtbl->EnumDevices(pObj, DI8DEVCLASS_ALL, DirectInputEnumDevCb, (PVOID)&Context, DIEDFL_ALLDEVICES);
 
     pObj->lpVtbl->Release(pObj);