[ros-diffs] [janderwald] 33121: - enlarge the dialog window - load treeview classes on startup - link to dinput8 + dxguid library - start implementing DirectInput dialog - use DirectInput version 8 for now

janderwald at svn.reactos.org janderwald at svn.reactos.org
Wed Apr 23 01:19:50 CEST 2008


Author: janderwald
Date: Tue Apr 22 18:19:50 2008
New Revision: 33121

URL: http://svn.reactos.org/svn/reactos?rev=33121&view=rev
Log:
- enlarge the dialog window
- load treeview classes on startup
- link to dinput8 + dxguid library
- start implementing DirectInput dialog
- use DirectInput version 8 for now


Modified:
    trunk/reactos/base/applications/dxdiag/dxdiag.c
    trunk/reactos/base/applications/dxdiag/dxdiag.rbuild
    trunk/reactos/base/applications/dxdiag/input.c
    trunk/reactos/base/applications/dxdiag/lang/en-US.rc
    trunk/reactos/base/applications/dxdiag/lang/fr-FR.rc
    trunk/reactos/base/applications/dxdiag/lang/pl-PL.rc
    trunk/reactos/base/applications/dxdiag/lang/ru-RU.rc
    trunk/reactos/base/applications/dxdiag/precomp.h
    trunk/reactos/base/applications/dxdiag/resource.h

Modified: trunk/reactos/base/applications/dxdiag/dxdiag.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/dxdiag.c?rev=33121&r1=33120&r2=33121&view=diff
==============================================================================
--- trunk/reactos/base/applications/dxdiag/dxdiag.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/dxdiag.c [iso-8859-1] Tue Apr 22 18:19:50 2008
@@ -187,7 +187,7 @@
     UNREFERENCED_PARAMETER(nCmdShow);
 
     InitControls.dwSize = sizeof(INITCOMMONCONTROLSEX);
-    InitControls.dwICC = ICC_TAB_CLASSES | ICC_LISTVIEW_CLASSES | ICC_STANDARD_CLASSES;
+    InitControls.dwICC = ICC_TAB_CLASSES | ICC_LISTVIEW_CLASSES | ICC_STANDARD_CLASSES | ICC_TREEVIEW_CLASSES;
     InitCommonControlsEx(&InitControls);
 
     hInst = hInstance;

Modified: trunk/reactos/base/applications/dxdiag/dxdiag.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/dxdiag.rbuild?rev=33121&r1=33120&r2=33121&view=diff
==============================================================================
--- trunk/reactos/base/applications/dxdiag/dxdiag.rbuild [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/dxdiag.rbuild [iso-8859-1] Tue Apr 22 18:19:50 2008
@@ -12,6 +12,8 @@
 	<library>comctl32</library>
 	<library>shell32</library>
 	<library>version</library>
+	<library>dinput8</library>
+	<library>dxguid</library>
 	<file>system.c</file>
 	<file>display.c</file>
 	<file>sound.c</file>

Modified: trunk/reactos/base/applications/dxdiag/input.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/input.c?rev=33121&r1=33120&r2=33121&view=diff
==============================================================================
--- trunk/reactos/base/applications/dxdiag/input.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/input.c [iso-8859-1] Tue Apr 22 18:19:50 2008
@@ -9,6 +9,194 @@
 
 #include "precomp.h"
 
+typedef struct
+{
+    HWND hwndDlg;
+    IDirectInput8W * pObj;
+    HWND hDevList;
+    HWND hPortTree;
+    INT Count;
+}INPUT_DIALOG_CONTEXT, *PINPUT_DIALOG_CONTEXT;
+
+
+BOOL CALLBACK DirectInputEnumDevCb(
+  LPCDIDEVICEINSTANCEW lpddi,
+  LPVOID pvRef
+)
+{
+    HRESULT hResult;
+    WCHAR szText[100];
+    IDirectInputDevice8W * pDev = NULL;
+    //DIPROPGUIDANDPATH GuidPath;
+    //DIPROPSTRING TypeName;
+    DIPROPDWORD VendorID;
+    DIDEVCAPS DevCaps;
+    DWORD dwProductID;
+    DWORD dwManufacturerID;
+    LVITEMW Item;
+    LRESULT lResult;
+
+    PINPUT_DIALOG_CONTEXT pContext = (PINPUT_DIALOG_CONTEXT)pvRef;
+
+    if (!pContext)
+        return DIENUM_STOP;
+
+    ZeroMemory(&Item, sizeof(LVITEMW));
+    Item.mask = LVIF_TEXT;
+    Item.pszText = (LPWSTR)lpddi->tszProductName;
+    Item.iItem = pContext->Count;
+    /* insert device item */
+    lResult = SendMessageW(pContext->hDevList, LVM_INSERTITEM, 0, (LPARAM)&Item);
+    if (lResult == -1)
+       return DIENUM_CONTINUE;
+
+    /* is the device attached */
+    szText[0] = L'\0';
+    hResult = pContext->pObj->lpVtbl->GetDeviceStatus(pContext->pObj, &lpddi->guidInstance);
+    if (hResult == DI_OK)
+        LoadStringW(hInst, IDS_DEVICE_STATUS_ATTACHED, szText, sizeof(szText) / sizeof(WCHAR));
+    else if (hResult == DI_NOTATTACHED)
+        LoadStringW(hInst, IDS_DEVICE_STATUS_MISSING, szText, sizeof(szText) / sizeof(WCHAR));
+    else
+        LoadStringW(hInst, IDS_DEVICE_STATUS_UNKNOWN, szText, sizeof(szText) / sizeof(WCHAR));
+
+    if (szText[0])
+    {
+       szText[(sizeof(szText) / sizeof(WCHAR))-1] = L'\0';
+       Item.iSubItem = 1;
+       Item.pszText = szText;
+       SendMessageW(pContext->hDevList, LVM_SETITEM, lResult, (LPARAM)&Item);
+    }
+
+    hResult = pContext->pObj->lpVtbl->CreateDevice(pContext->pObj, &lpddi->guidInstance, &pDev, NULL);
+
+    if (hResult != DI_OK)
+        return DIENUM_STOP;
+
+    ZeroMemory(&VendorID, sizeof(DIPROPDWORD));
+    VendorID.diph.dwSize = sizeof(DIPROPDWORD);
+    VendorID.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+
+    hResult = pDev->lpVtbl->GetProperty(pDev, DIPROP_VIDPID, (LPDIPROPHEADER)&VendorID);
+    if (hResult == DI_OK)
+    {
+        /* set manufacturer id */
+        dwManufacturerID = LOWORD(VendorID.dwData);
+        swprintf(szText, L"0x%04X", dwManufacturerID);
+        Item.iSubItem = 3;
+        SendMessageW(pContext->hDevList, LVM_SETITEM, lResult, (LPARAM)&Item);
+        /* set product id */
+        dwProductID = HIWORD(VendorID.dwData);
+        swprintf(szText, L"0x%04X", dwProductID);
+        Item.iSubItem = 4;
+        SendMessageW(pContext->hDevList, LVM_SETITEM, lResult, (LPARAM)&Item);
+    }
+    else
+    {
+        szText[0] = L'\0';
+        LoadStringW(hInst, IDS_NOT_APPLICABLE, szText, sizeof(szText) / sizeof(WCHAR));
+        szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0';
+        /* set manufacturer id */
+        Item.iSubItem = 3;
+        SendMessageW(pContext->hDevList, LVM_SETITEM, lResult, (LPARAM)&Item);
+        /* set product id */
+        Item.iSubItem = 4;
+        SendMessageW(pContext->hDevList, LVM_SETITEM, lResult, (LPARAM)&Item);
+    }
+
+    /* check for force feedback support */
+    DevCaps.dwSize = sizeof(DIDEVCAPS); // use DIDEVCAPS_DX3 for DX3 support
+    hResult = pDev->lpVtbl->GetCapabilities(pDev, &DevCaps);
+    szText[0] = L'\0';
+    if (hResult == DI_OK)
+    {
+        if (DevCaps.dwFlags & DIDC_FORCEFEEDBACK)
+            LoadStringW(hInst, IDS_OPTION_YES, szText, sizeof(szText)/sizeof(WCHAR));
+        else
+            LoadStringW(hInst, IDS_NOT_APPLICABLE, szText, sizeof(szText)/sizeof(WCHAR));
+    }
+    else
+    {
+        LoadStringW(hInst, IDS_NOT_APPLICABLE, szText, sizeof(szText)/sizeof(WCHAR));
+    }
+
+    Item.iSubItem = 5;
+    SendMessageW(pContext->hDevList, LVM_SETITEM, lResult, (LPARAM)&Item);
+
+
+#if 0
+    ZeroMemory(&GuidPath, sizeof(DIPROPGUIDANDPATH));
+    GuidPath.diph.dwSize = sizeof(DIPROPGUIDANDPATH);
+    GuidPath.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+	GuidPath.diph.dwHow = DIPH_DEVICE;
+    hResult = pDev->lpVtbl->GetProperty(pDev, DIPROP_GUIDANDPATH, (LPDIPROPHEADER)&GuidPath);
+
+    ZeroMemory(&TypeName, sizeof(TypeName));
+    TypeName.diph.dwSize = sizeof(TypeName);
+    TypeName.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+	TypeName.diph.dwHow = DIPH_DEVICE;
+    hResult = pDev->lpVtbl->GetProperty(pDev, DIPROP_GETPORTDISPLAYNAME, (LPDIPROPHEADER)&TypeName);
+
+
+#endif
+
+
+    pDev->lpVtbl->Release(pDev);
+    pContext->Count++;
+
+
+    return DIENUM_CONTINUE;
+}
+
+VOID
+InitListViewColumns(PINPUT_DIALOG_CONTEXT pContext)
+{
+    WCHAR szText[256];
+    LVCOLUMNW lvcolumn;
+    INT Index;
+
+
+    pContext->hDevList = GetDlgItem(pContext->hwndDlg, IDC_LIST_DEVICE);
+
+    ZeroMemory(&lvcolumn, sizeof(LVCOLUMNW));
+    lvcolumn.pszText = szText;
+    lvcolumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH;
+    lvcolumn.fmt = LVCFMT_LEFT;
+    lvcolumn.cx = 100;
+
+    for(Index = 0; Index < 6; Index++)
+    {
+        szText[0] = L'\0';
+        LoadStringW(hInst, IDS_DEVICE_NAME + Index, szText, sizeof(szText) / sizeof(WCHAR));
+        szText[(sizeof(szText) / sizeof(WCHAR))-1] = L'\0';
+        if (SendMessageW(pContext->hDevList, LVM_INSERTCOLUMNW, Index, (LPARAM)&lvcolumn) == -1)
+            return;
+    }
+}
+
+static
+void
+InitializeDirectInputDialog(HWND hwndDlg)
+{
+    INPUT_DIALOG_CONTEXT Context;
+    HRESULT hResult;
+    IDirectInput8W * pObj;
+
+    hResult = DirectInput8Create(hInst, DIRECTINPUT_VERSION, &IID_IDirectInput8W, (LPVOID*)&pObj, NULL);
+    if (hResult != DI_OK)
+        return;
+
+    ZeroMemory(&Context, sizeof(Context));
+    Context.pObj = pObj;
+    Context.hwndDlg = hwndDlg;
+    InitListViewColumns(&Context);
+    hResult = pObj->lpVtbl->EnumDevices(pObj, DI8DEVCLASS_ALL, DirectInputEnumDevCb, (PVOID)&Context, DIEDFL_ALLDEVICES);
+
+    pObj->lpVtbl->Release(pObj);
+}
+
+
+
 INT_PTR CALLBACK
 InputPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 {
@@ -18,6 +206,7 @@
         case WM_INITDIALOG:
         {
             SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
+            InitializeDirectInputDialog(hDlg);
             return TRUE;
         }
     }

Modified: trunk/reactos/base/applications/dxdiag/lang/en-US.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/lang/en-US.rc?rev=33121&r1=33120&r2=33121&view=diff
==============================================================================
--- trunk/reactos/base/applications/dxdiag/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/lang/en-US.rc [iso-8859-1] Tue Apr 22 18:19:50 2008
@@ -1,17 +1,17 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
-IDD_MAIN_DIALOG DIALOGEX DISCARDABLE  0, 0, 378, 260
+IDD_MAIN_DIALOG DIALOGEX DISCARDABLE  0, 0, 378, 280
 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
     WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU |
     WS_THICKFRAME
 CAPTION "ReactX-Diagnostic program"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,195
-    PUSHBUTTON "&Help", IDC_BUTTON_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    DEFPUSHBUTTON "&Next Page", IDC_BUTTON_NEXT, 137, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    PUSHBUTTON "&Save All Information...", IDC_BUTTON_SAVE_INFO, 201, 201, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    PUSHBUTTON "&Exit", IDC_BUTTON_EXIT, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,250
+    PUSHBUTTON "&Help", IDC_BUTTON_HELP, 2, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    DEFPUSHBUTTON "&Next Page", IDC_BUTTON_NEXT, 137, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    PUSHBUTTON "&Save All Information...", IDC_BUTTON_SAVE_INFO, 201, 261, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    PUSHBUTTON "&Exit", IDC_BUTTON_EXIT, 323, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
 END
 
 IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
@@ -65,10 +65,16 @@
 END
 
 
-IDD_INPUT_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
+IDD_INPUT_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 220
 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
 FONT 8, "MS Shell Dlg"
 BEGIN
+    GROUPBOX "DirectInput Devices", -1, 10, 10, 352, 80
+    CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 332, 60
+    GROUPBOX "Input Devices", -1, 10, 100, 352, 60
+    CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 110, 332, 40, 0x00000200
+    GROUPBOX "Information", -1, 10, 170, 352, 50
+    EDITTEXT  IDC_RICH_INFO, 20, 180, 332, 30, WS_DISABLED | WS_TABSTOP
 END
 
 IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
@@ -98,4 +104,15 @@
 	IDS_FORMAT_UNIPROC "%s (%u CPU)"
 	IDS_FORMAT_MPPROC  "%s (%u CPUs)"
 	IDS_VERSION_UNKNOWN "Unknown Version"
+	IDS_DEVICE_STATUS_ATTACHED "Connected"
+	IDS_DEVICE_STATUS_MISSING "Disconnected"
+	IDS_DEVICE_STATUS_UNKNOWN "Unknown"
+	IDS_DEVICE_NAME "Device name"
+	IDS_DEVICE_STATUS "Status"
+	IDS_DEVICE_CONTROLLER "Controller ID"
+	IDS_DEVICE_MANUFACTURER "Manufacturer ID"
+	IDS_DEVICE_PRODUCT "Product ID"
+	IDS_DEVICE_FORCEFEEDBACK "Force Feedback-Driver"
+	IDS_NOT_APPLICABLE "Not applicable"
+	IDS_OPTION_YES "Yes"
 END

Modified: trunk/reactos/base/applications/dxdiag/lang/fr-FR.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/lang/fr-FR.rc?rev=33121&r1=33120&r2=33121&view=diff
==============================================================================
--- trunk/reactos/base/applications/dxdiag/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/lang/fr-FR.rc [iso-8859-1] Tue Apr 22 18:19:50 2008
@@ -1,17 +1,17 @@
 LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
 
-IDD_MAIN_DIALOG DIALOGEX DISCARDABLE  0, 0, 378, 220
+IDD_MAIN_DIALOG DIALOGEX DISCARDABLE  0, 0, 378, 280
 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
     WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU |
     WS_THICKFRAME
 CAPTION "ReactX - Programme de diagnostic"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,195
-    PUSHBUTTON "Aide", IDC_BUTTON_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    DEFPUSHBUTTON "Page suiva&nte", IDC_BUTTON_NEXT, 137, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    PUSHBUTTON "Enregi&strer toutes les informations...", IDC_BUTTON_SAVE_INFO, 201, 201, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    PUSHBUTTON "Quitt&er", IDC_BUTTON_EXIT, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,250
+    PUSHBUTTON "Aide", IDC_BUTTON_HELP, 2, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    DEFPUSHBUTTON "Page suiva&nte", IDC_BUTTON_NEXT, 137, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    PUSHBUTTON "Enregi&strer toutes les informations...", IDC_BUTTON_SAVE_INFO, 201, 261, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    PUSHBUTTON "Quitt&er", IDC_BUTTON_EXIT, 323, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
 END
 
 IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
@@ -65,10 +65,16 @@
 END
 
 
-IDD_INPUT_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
+IDD_INPUT_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 220
 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
 FONT 8, "MS Shell Dlg"
 BEGIN
+    GROUPBOX "DirectInput Devices", -1, 10, 10, 352, 80
+    CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 332, 60
+    GROUPBOX "Input Devices", -1, 10, 100, 352, 60
+    CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 110, 332, 40, 0x00000200
+    GROUPBOX "Information", -1, 10, 170, 352, 50
+    EDITTEXT  IDC_RICH_INFO, 20, 180, 332, 30, WS_DISABLED | WS_TABSTOP
 END
 
 IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
@@ -98,4 +104,15 @@
 	IDS_FORMAT_UNIPROC "%s (%u CPU)"
 	IDS_FORMAT_MPPROC  "%s (%u CPUs)"
 	IDS_VERSION_UNKNOWN "Unknown Version"
+	IDS_DEVICE_STATUS_ATTACHED "Connected"
+	IDS_DEVICE_STATUS_MISSING "Disconnected"
+	IDS_DEVICE_STATUS_UNKNOWN "Unknown"
+	IDS_DEVICE_NAME "Device name"
+	IDS_DEVICE_STATUS "Status"
+	IDS_DEVICE_CONTROLLER "Controller ID"
+	IDS_DEVICE_MANUFACTURER "Manufacturer ID"
+	IDS_DEVICE_PRODUCT "Product ID"
+	IDS_DEVICE_FORCEFEEDBACK "Force Feedback-Driver"
+	IDS_NOT_APPLICABLE "Not applicable"
+	IDS_OPTION_YES "Yes"
 END

Modified: trunk/reactos/base/applications/dxdiag/lang/pl-PL.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/lang/pl-PL.rc?rev=33121&r1=33120&r2=33121&view=diff
==============================================================================
--- trunk/reactos/base/applications/dxdiag/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/lang/pl-PL.rc [iso-8859-1] Tue Apr 22 18:19:50 2008
@@ -7,18 +7,18 @@
 
 LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
 
-IDD_MAIN_DIALOG DIALOGEX DISCARDABLE  0, 0, 378, 220
+IDD_MAIN_DIALOG DIALOGEX DISCARDABLE  0, 0, 378, 280
 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
     WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU |
     WS_THICKFRAME
 CAPTION "Narzêdzie diagnostyki ReactX"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,195
-    PUSHBUTTON "&Pomoc", IDC_BUTTON_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    DEFPUSHBUTTON "&Nastêpna Strona", IDC_BUTTON_NEXT, 137, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    PUSHBUTTON "&Zapisz wszystkie informacje...", IDC_BUTTON_SAVE_INFO, 201, 201, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    PUSHBUTTON "&Wyjœcie", IDC_BUTTON_EXIT, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,250
+    PUSHBUTTON "&Pomoc", IDC_BUTTON_HELP, 2, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    DEFPUSHBUTTON "&Nastêpna Strona", IDC_BUTTON_NEXT, 137, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    PUSHBUTTON "&Zapisz wszystkie informacje...", IDC_BUTTON_SAVE_INFO, 201, 261, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    PUSHBUTTON "&Wyjœcie", IDC_BUTTON_EXIT, 323, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
 END
 
 IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
@@ -72,10 +72,16 @@
 END
 
 
-IDD_INPUT_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
+IDD_INPUT_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 220
 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
 FONT 8, "MS Shell Dlg"
 BEGIN
+    GROUPBOX "DirectInput Devices", -1, 10, 10, 352, 80
+    CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 332, 60
+    GROUPBOX "Input Devices", -1, 10, 100, 352, 60
+    CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 110, 332, 40, 0x00000200
+    GROUPBOX "Information", -1, 10, 170, 352, 50
+    EDITTEXT  IDC_RICH_INFO, 20, 180, 332, 30, WS_DISABLED | WS_TABSTOP
 END
 
 IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
@@ -105,4 +111,16 @@
 	IDS_FORMAT_UNIPROC "%s (%u CPU)"
 	IDS_FORMAT_MPPROC  "%s (%u CPUs)"
 	IDS_VERSION_UNKNOWN "Unknown Version"
+	IDS_DEVICE_STATUS_ATTACHED "Connected"
+	IDS_DEVICE_STATUS_MISSING "Disconnected"
+	IDS_DEVICE_STATUS_UNKNOWN "Unknown"
+	IDS_DEVICE_NAME "Device name"
+	IDS_DEVICE_STATUS "Status"
+	IDS_DEVICE_CONTROLLER "Controller ID"
+	IDS_DEVICE_MANUFACTURER "Manufacturer ID"
+	IDS_DEVICE_PRODUCT "Product ID"
+	IDS_DEVICE_FORCEFEEDBACK "Force Feedback-Driver"
+	IDS_NOT_APPLICABLE "Not applicable"
+	IDS_OPTION_YES "Yes"
+
 END

Modified: trunk/reactos/base/applications/dxdiag/lang/ru-RU.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/lang/ru-RU.rc?rev=33121&r1=33120&r2=33121&view=diff
==============================================================================
--- trunk/reactos/base/applications/dxdiag/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/lang/ru-RU.rc [iso-8859-1] Tue Apr 22 18:19:50 2008
@@ -1,17 +1,17 @@
 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
 
-IDD_MAIN_DIALOG DIALOGEX DISCARDABLE  0, 0, 378, 220
+IDD_MAIN_DIALOG DIALOGEX DISCARDABLE  0, 0, 378, 280
 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
     WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU |
     WS_THICKFRAME
 CAPTION "Ñðåäñòâî äèàãíîñòèêè ReactX"
 FONT 8, "MS Shell Dlg"
 BEGIN
-    CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,195
-    PUSHBUTTON "&Ñïðàâêà", IDC_BUTTON_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    DEFPUSHBUTTON "&Ñëåäóþùàÿ ñòðàíèöà", IDC_BUTTON_NEXT, 101, 201, 94, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    PUSHBUTTON "Ñ&îõðàíèòü âñþ èíôîðìàöèþ...", IDC_BUTTON_SAVE_INFO, 199, 201, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
-    PUSHBUTTON "&Âûõîä", IDC_BUTTON_EXIT, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,250
+    PUSHBUTTON "&Ñïðàâêà", IDC_BUTTON_HELP, 2, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    DEFPUSHBUTTON "&Ñëåäóþùàÿ ñòðàíèöà", IDC_BUTTON_NEXT, 101, 261, 94, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    PUSHBUTTON "Ñ&îõðàíèòü âñþ èíôîðìàöèþ...", IDC_BUTTON_SAVE_INFO, 199, 261, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+    PUSHBUTTON "&Âûõîä", IDC_BUTTON_EXIT, 323, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
 END
 
 IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
@@ -65,10 +65,16 @@
 END
 
 
-IDD_INPUT_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
+IDD_INPUT_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 220
 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
 FONT 8, "MS Shell Dlg"
 BEGIN
+    GROUPBOX "DirectInput Devices", -1, 10, 10, 352, 80
+    CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 332, 60
+    GROUPBOX "Input Devices", -1, 10, 100, 352, 60
+    CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 110, 332, 40, 0x00000200
+    GROUPBOX "Information", -1, 10, 170, 352, 50
+    EDITTEXT  IDC_RICH_INFO, 20, 180, 332, 30, WS_DISABLED | WS_TABSTOP
 END
 
 IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE  0, 0, 362, 190
@@ -98,4 +104,16 @@
 	IDS_FORMAT_UNIPROC "%s (%u ÖÏ)"
 	IDS_FORMAT_MPPROC  "%s (%u ÖÏ)"
 	IDS_VERSION_UNKNOWN "Íåèçâåñòíàÿ âåðñèÿ"
+	IDS_DEVICE_STATUS_ATTACHED "Connected"
+	IDS_DEVICE_STATUS_MISSING "Disconnected"
+	IDS_DEVICE_STATUS_UNKNOWN "Unknown"
+	IDS_DEVICE_NAME "Device name"
+	IDS_DEVICE_STATUS "Status"
+	IDS_DEVICE_CONTROLLER "Controller ID"
+	IDS_DEVICE_MANUFACTURER "Manufacturer ID"
+	IDS_DEVICE_PRODUCT "Product ID"
+	IDS_DEVICE_FORCEFEEDBACK "Force Feedback-Driver"
+	IDS_NOT_APPLICABLE "Not applicable"
+	IDS_OPTION_YES "Yes"
+
 END

Modified: trunk/reactos/base/applications/dxdiag/precomp.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/precomp.h?rev=33121&r1=33120&r2=33121&view=diff
==============================================================================
--- trunk/reactos/base/applications/dxdiag/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/precomp.h [iso-8859-1] Tue Apr 22 18:19:50 2008
@@ -1,9 +1,15 @@
 #ifndef PRECOMP_H__
 #define PRECOMP_H__
 
+#define DIRECTINPUT_VERSION 0x0800
+
 #include <stdio.h>
 #include <windows.h>
+#include <setupapi.h>
+#include <devguid.h>
 #include <commctrl.h>
+
+#include <dinput.h>
 #include "resource.h"
 
 typedef struct
@@ -11,7 +17,6 @@
 	HWND hDialogs[7];
 
 }DXDIAG_CONTEXT, *PDXDIAG_CONTEXT;
-
 
 
 

Modified: trunk/reactos/base/applications/dxdiag/resource.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/resource.h?rev=33121&r1=33120&r2=33121&view=diff
==============================================================================
--- trunk/reactos/base/applications/dxdiag/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/resource.h [iso-8859-1] Tue Apr 22 18:19:50 2008
@@ -19,6 +19,8 @@
 #define IDC_BUTTON_SAVE_INFO      1003
 #define IDC_BUTTON_EXIT           1004
 
+/* system dialog constants */
+
 #define IDC_STATIC_TIME           2000
 #define IDC_STATIC_COMPUTER       2001
 #define IDC_STATIC_OS             2002
@@ -31,6 +33,12 @@
 #define IDC_STATIC_SWAP           2009
 #define IDC_STATIC_VERSION        2010
 
+
+/* DirectInput dialog constants */
+
+#define IDC_LIST_DEVICE           6000
+#define IDC_TREE_PORT             6001
+#define IDC_RICH_INFO             6002
 
 /* string resource constants */
 #define IDS_MAIN_DIALOG     10000
@@ -46,6 +54,17 @@
 #define IDS_FORMAT_UNIPROC  10010
 #define IDS_FORMAT_MPPROC   10011
 #define IDS_VERSION_UNKNOWN 10012
+#define IDS_DEVICE_STATUS_ATTACHED 10013
+#define IDS_DEVICE_STATUS_MISSING  10014
+#define IDS_DEVICE_STATUS_UNKNOWN  10015
+#define IDS_DEVICE_NAME            10016
+#define IDS_DEVICE_STATUS          10017
+#define IDS_DEVICE_CONTROLLER      10018
+#define IDS_DEVICE_MANUFACTURER    10019
+#define IDS_DEVICE_PRODUCT         10020
+#define IDS_DEVICE_FORCEFEEDBACK   10021
+#define IDS_NOT_APPLICABLE         10100
+#define IDS_OPTION_YES             10101
 
 /* icon resource constants */
 #define IDI_APPICON        20000



More information about the Ros-diffs mailing list