From 552b2ba55c68c11da577b89be9d677f15972be54 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Wed, 26 Nov 2014 17:21:45 +0000 Subject: [PATCH] [DEVICE_MANAGER] - Add a class for managing the device view, and a class for managing the device objects. - Implement listing devices by type and by connection. - Add support for showing hidden devices - Add support for showing unknown devices with overlay icons. - implement showing the device properties via dounle click or hitting enter - Add support for both Win7/8 as well as XP - Make the code much more readable and maintainable. and easier to move to an mmc snapin if we ever get one. I forgot this existed until today. I had some spare time so I decided to have a quick go at finishing it. Stick with the original one for now though, I ran out of time.... svn path=/trunk/; revision=65493 --- .../mscutils/devmgmt_new/DeviceView.cpp | 487 +++++++++++++- .../mscutils/devmgmt_new/DeviceView.h | 64 +- .../mscutils/devmgmt_new/Devices.cpp | 614 +++++++++++++++++- .../mscutils/devmgmt_new/Devices.h | 90 +++ .../mscutils/devmgmt_new/MainWindow.cpp | 468 ++++++++----- .../mscutils/devmgmt_new/MainWindow.h | 7 +- .../mscutils/devmgmt_new/Resource.h | 11 +- .../mscutils/devmgmt_new/devmgmt.cpp | 9 +- .../mscutils/devmgmt_new/devmgmt_new.sln | 26 +- .../mscutils/devmgmt_new/devmgmt_new.vcxproj | 37 +- .../devmgmt_new/devmgmt_new.vcxproj.filters | 59 ++ .../mscutils/devmgmt_new/lang/bg-BG.rc | 6 +- .../mscutils/devmgmt_new/lang/de-DE.rc | 6 +- .../mscutils/devmgmt_new/lang/el-GR.rc | 6 +- .../mscutils/devmgmt_new/lang/en-US.rc | 43 +- .../mscutils/devmgmt_new/lang/es-ES.rc | 16 +- .../mscutils/devmgmt_new/lang/fr-FR.rc | 6 +- .../mscutils/devmgmt_new/lang/he-IL.rc | 6 +- .../mscutils/devmgmt_new/lang/id-ID.rc | 6 +- .../mscutils/devmgmt_new/lang/it-IT.rc | 6 +- .../mscutils/devmgmt_new/lang/ja-JP.rc | 6 +- .../mscutils/devmgmt_new/lang/ko-KR.rc | 6 +- .../mscutils/devmgmt_new/lang/no-NO.rc | 6 +- .../mscutils/devmgmt_new/lang/pl-PL.rc | 6 +- .../mscutils/devmgmt_new/lang/pt-BR.rc | 6 +- .../mscutils/devmgmt_new/lang/ro-RO.rc | 6 +- .../mscutils/devmgmt_new/lang/ru-RU.rc | 24 +- .../mscutils/devmgmt_new/lang/sk-SK.rc | 6 +- .../mscutils/devmgmt_new/lang/sv-SE.rc | 6 +- .../mscutils/devmgmt_new/lang/th-TH.rc | 6 +- .../mscutils/devmgmt_new/lang/tr-TR.rc | 49 +- .../mscutils/devmgmt_new/lang/uk-UA.rc | 6 +- .../mscutils/devmgmt_new/lang/zh-CN.rc | 6 +- .../applications/mscutils/devmgmt_new/rsrc.rc | 13 +- .../mscutils/devmgmt_new/stdafx.h | 2 + .../mscutils/devmgmt_new/targetver.h | 8 + 36 files changed, 1795 insertions(+), 340 deletions(-) create mode 100644 reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj.filters create mode 100644 reactos/base/applications/mscutils/devmgmt_new/targetver.h diff --git a/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp b/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp index 922ddde4693..a58593d56d8 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp +++ b/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp @@ -1,50 +1,112 @@ -#include "StdAfx.h" +/* +* PROJECT: ReactOS Device Manager +* LICENSE: GPL - See COPYING in the top level directory +* FILE: base/applications/mscutils/devmgmt/deviceview.cpp +* PURPOSE: Implements the tree view which holds the devices +* COPYRIGHT: Copyright 2014 Ged Murphy +* +*/ + + +#include "stdafx.h" #include "devmgmt.h" #include "DeviceView.h" -CDeviceView::CDeviceView(HWND hMainWnd) : +/* DATA *********************************************/ + +#define DEVICE_NAME_LEN 256 +#define CLASS_NAME_LEN 256 +#define CLASS_DESC_LEN 256 + +INT_PTR +WINAPI +DevicePropertiesExW( + IN HWND hWndParent OPTIONAL, + IN LPCWSTR lpMachineName OPTIONAL, + IN LPCWSTR lpDeviceID OPTIONAL, + IN DWORD dwFlags OPTIONAL, + IN BOOL bShowDevMgr +); + +typedef INT_PTR(WINAPI *pDevicePropertiesExW)(HWND,LPCWSTR,LPCWSTR,DWORD,BOOL); + + +/* PUBLIC METHODS *************************************/ + +CDeviceView::CDeviceView( + HWND hMainWnd + ) : + m_Devices(NULL), m_hMainWnd(hMainWnd), m_hTreeView(NULL), m_hPropertyDialog(NULL), - m_hShortcutMenu(NULL) + m_hShortcutMenu(NULL), + m_ListDevices(DevicesByType), + m_ShowHidden(FALSE), + m_ShowUnknown(TRUE) { + m_Devices = new CDevices(); } - CDeviceView::~CDeviceView(void) { + delete m_Devices; + m_Devices = NULL; } BOOL CDeviceView::Initialize() { + BOOL bSuccess; + + /* Initialize the devices class */ + bSuccess = m_Devices->Initialize(); + if (bSuccess == FALSE) return FALSE; + /* Create the main treeview */ m_hTreeView = CreateWindowExW(WS_EX_CLIENTEDGE, - WC_TREEVIEW, - NULL, - WS_CHILD | WS_VISIBLE | WS_BORDER | TVS_HASLINES | - TVS_HASBUTTONS | TVS_SHOWSELALWAYS | TVS_LINESATROOT, - 0, 0, 0, 0, - m_hMainWnd, - (HMENU)IDC_TREEVIEW, - g_hInstance, - NULL); + WC_TREEVIEW, + NULL, + WS_CHILD | WS_VISIBLE | WS_BORDER | TVS_HASLINES | + TVS_HASBUTTONS | TVS_SHOWSELALWAYS | TVS_LINESATROOT, + 0, 0, 0, 0, + m_hMainWnd, + (HMENU)IDC_TREEVIEW, + g_hInstance, + NULL); if (m_hTreeView) { - + /* Get the devices image list */ + m_ImageList = m_Devices->GetImageList(); + + /* Set the image list against the treeview */ + (VOID)TreeView_SetImageList(m_hTreeView, + m_ImageList, + TVSIL_NORMAL); + + /* Display the devices */ + Refresh(); } return !!(m_hTreeView); +} + +BOOL +CDeviceView::Uninitialize() +{ + (VOID)m_Devices->Uninitialize(); return TRUE; } VOID -CDeviceView::Size(INT x, - INT y, - INT cx, - INT cy) +CDeviceView::Size( + _In_ INT x, + _In_ INT y, + _In_ INT cx, + _In_ INT cy + ) { /* Resize the treeview */ SetWindowPos(m_hTreeView, @@ -56,23 +118,400 @@ CDeviceView::Size(INT x, SWP_NOZORDER); } -BOOL -CDeviceView::Uninitialize() -{ - return TRUE; -} VOID CDeviceView::Refresh() { + HANDLE hThread; + + /* Run on a new thread to keep the gui responsive */ + hThread = (HANDLE)_beginthreadex(NULL, + 0, + &ListDevicesThread, + this, + 0, + NULL); + + if (hThread) CloseHandle(hThread); } VOID CDeviceView::DisplayPropertySheet() { +#ifndef __REACTOS__ + pDevicePropertiesExW DevicePropertiesExW; + HMODULE hModule; + + hModule = LoadLibraryW(L"devmgr.dll"); + if (hModule == NULL) return; + + DevicePropertiesExW = (pDevicePropertiesExW)GetProcAddress(hModule, + "DevicePropertiesExW"); + if (DevicePropertiesExW == NULL) + { + FreeLibrary(hModule); + return; + } +#endif + + TV_ITEM tvItem; + + tvItem.hItem = TreeView_GetSelection(m_hTreeView); + tvItem.mask = TVIF_PARAM; + + if (TreeView_GetItem(m_hTreeView, &tvItem) && + (LPTSTR)tvItem.lParam != NULL) + { + DevicePropertiesExW(m_hTreeView, + NULL, + (LPTSTR)tvItem.lParam, + 1,//DPF_EXTENDED, + FALSE); + } + +#ifndef __REACTOS__ + FreeLibrary(hModule); +#endif } VOID CDeviceView::SetFocus() { -} \ No newline at end of file +} + + +/* PRIVATE METHODS ********************************************/ + +unsigned int __stdcall CDeviceView::ListDevicesThread(void *Param) +{ + CDeviceView *This = (CDeviceView *)Param; + + /* Check if there are any items in the tree */ + if (TreeView_GetRoot(This->m_hTreeView) != NULL) + { + /* Delete all the items */ + (VOID)TreeView_DeleteAllItems(This->m_hTreeView); + } + + /* Reset the tree root */ + This->m_hTreeRoot = NULL; + + switch (This->m_ListDevices) + { + case DevicesByType: + (VOID)This->ListDevicesByType(); + break; + + case DevicesByConnection: + (VOID)This->ListDevicesByConnection(); + break; + + case ResourcesByType: + break; + + case ResourcesByConnection: + break; + } + return 0; +} + + +BOOL +CDeviceView::ListDevicesByType() +{ + HTREEITEM hDevItem = NULL; + GUID ClassGuid; + WCHAR ClassName[CLASS_NAME_LEN]; + WCHAR ClassDescription[CLASS_DESC_LEN]; + INT ClassIndex; + INT ClassImage; + LPTSTR DeviceId = NULL; + + BOOL IsUnknown = FALSE; + BOOL IsHidden = FALSE; + BOOL bSuccess; + + + /* Get the details of the root of the device tree */ + bSuccess = m_Devices->GetDeviceTreeRoot(ClassName, CLASS_NAME_LEN, &ClassImage); + if (bSuccess) + { + /* Add the root of the device tree to the treeview */ + m_hTreeRoot = InsertIntoTreeView(NULL, + ClassName, + NULL, + ClassImage, + 0); + } + + /* If something went wrong, bail */ + if (m_hTreeRoot == NULL) return FALSE; + + ClassIndex = 0; + do + { + /* Get the next device class */ + bSuccess = m_Devices->EnumClasses(ClassIndex, + &ClassGuid, + ClassName, + CLASS_NAME_LEN, + ClassDescription, + CLASS_DESC_LEN, + &ClassImage, + &IsUnknown, + &IsHidden); + if (bSuccess && + (IsUnknown == FALSE || (IsUnknown && m_ShowUnknown)) && + (IsHidden == FALSE || (IsHidden && m_ShowHidden))) + { + BOOL bDevSuccess, AddedParent; + HANDLE Handle = NULL; + WCHAR DeviceName[DEVICE_NAME_LEN]; + INT DeviceIndex = 0; + BOOL MoreItems = FALSE; + BOOL DeviceHasProblem = FALSE; + ULONG DeviceStatus, ProblemNumber; + ULONG OverlayImage = 0; + + AddedParent = FALSE; + + do + { + /* Enum all the devices that belong to this class */ + bDevSuccess = m_Devices->EnumDevicesForClass(&Handle, + &ClassGuid, + DeviceIndex, + &MoreItems, + DeviceName, + DEVICE_NAME_LEN, + &DeviceId); + if (bDevSuccess) + { + /* We have a device, we're gonna need to add the parent first */ + if (AddedParent == FALSE) + { + /* Insert the new class under the root item */ + hDevItem = InsertIntoTreeView(m_hTreeRoot, + ClassDescription, + NULL, + ClassImage, + 0); + + /* Don't add it again */ + AddedParent = TRUE; + } + + /* Get the status of the device */ + if (m_Devices->GetDeviceStatus(DeviceId, + &DeviceStatus, + &ProblemNumber)) + { + /* Check if the device has a problem */ + if (DeviceStatus & DN_HAS_PROBLEM) + { + DeviceHasProblem = TRUE; + OverlayImage = 1; + } + + /* The disabled overlay takes precidence over the problem overlay */ + if (ProblemNumber == CM_PROB_DISABLED || + ProblemNumber == CM_PROB_HARDWARE_DISABLED) + { + OverlayImage = 2; + } + } + + /* Add the device under the class item */ + (VOID)InsertIntoTreeView(hDevItem, + DeviceName, + (LPARAM)DeviceId, + ClassImage, + OverlayImage); + + /* Check if there's a problem with the device */ + if (DeviceHasProblem) + { + /* Expand the class */ + (VOID)TreeView_Expand(m_hTreeView, + hDevItem, + TVE_EXPAND); + } + } + + DeviceIndex++; + + } while (MoreItems); + + /* Check if this class has any devices */ + if (AddedParent == TRUE) + { + /* Sort the devices alphabetically */ + (VOID)TreeView_SortChildren(m_hTreeView, + hDevItem, + 0); + } + } + + ClassIndex++; + + } while (bSuccess); + + /* Sort the classes alphabetically */ + (VOID)TreeView_SortChildren(m_hTreeView, + m_hTreeRoot, + 0); + + /* Expand the root item */ + (VOID)TreeView_Expand(m_hTreeView, + m_hTreeRoot, + TVE_EXPAND); + + /* Pre-select the root item */ + (VOID)TreeView_SelectItem(m_hTreeView, + m_hTreeRoot); + + return 0; +} + +BOOL +CDeviceView::ListDevicesByConnection() +{ + WCHAR DeviceName[DEVICE_NAME_LEN]; + INT ClassImage; + BOOL bSuccess; + + /* Get the details of the root of the device tree */ + bSuccess = m_Devices->GetDeviceTreeRoot(DeviceName, DEVICE_NAME_LEN, &ClassImage); + if (bSuccess) + { + /* Add the root of the device tree to the treeview */ + m_hTreeRoot = InsertIntoTreeView(NULL, + DeviceName, + NULL, + ClassImage, + 0); + } + + /* Walk the device tree and add all the devices */ + RecurseChildDevices(m_Devices->GetRootDevice(), m_hTreeRoot); + + /* Expand the root item */ + (VOID)TreeView_Expand(m_hTreeView, + m_hTreeRoot, + TVE_EXPAND); + + return TRUE; +} + +VOID +CDeviceView::RecurseChildDevices( + _In_ DEVINST ParentDevice, + _In_ HTREEITEM hParentTreeItem + ) +{ + HTREEITEM hDevItem = NULL; + DEVINST Device; + WCHAR DeviceName[DEVICE_NAME_LEN]; + LPTSTR DeviceId = NULL; + INT ClassImage; + BOOL IsUnknown = FALSE; + BOOL IsHidden = FALSE; + BOOL bSuccess; + + /* Check if the parent has any child devices */ + if (m_Devices->GetChildDevice(ParentDevice, &Device) == FALSE) + return; + + /* Lookup the info about this device */ + bSuccess = m_Devices->GetDevice(Device, + DeviceName, + DEVICE_NAME_LEN, + &DeviceId, + &ClassImage, + &IsUnknown, + &IsHidden); + if (bSuccess) + { + /* Add this device to the tree under its parent */ + hDevItem = InsertIntoTreeView(hParentTreeItem, + DeviceName, + (LPARAM)DeviceId, + ClassImage, + 0); + if (hDevItem) + { + /* Check if this child has any children itself */ + RecurseChildDevices(Device, hDevItem); + } + } + + + for (;;) + { + /* Check if the parent device has anything at the same level */ + bSuccess = m_Devices->GetSiblingDevice(Device, &Device); + if (bSuccess == FALSE) break; + + /* Lookup the info about this device */ + bSuccess = m_Devices->GetDevice(Device, + DeviceName, + DEVICE_NAME_LEN, + &DeviceId, + &ClassImage, + &IsUnknown, + &IsHidden); + if (bSuccess) + { + /* Add this device to the tree under its parent */ + hDevItem = InsertIntoTreeView(hParentTreeItem, + DeviceName, + (LPARAM)DeviceId, + ClassImage, + 0); + if (hDevItem) + { + /* Check if this child has any children itself */ + RecurseChildDevices(Device, hDevItem); + } + } + } + + (void)TreeView_SortChildren(m_hTreeView, + hParentTreeItem, + 0); +} + + HTREEITEM +CDeviceView::InsertIntoTreeView( + _In_ HTREEITEM hParent, + _In_z_ LPWSTR lpLabel, + _In_ LPARAM lParam, + _In_ INT DevImage, + _In_ UINT OverlayImage + ) +{ + TV_ITEMW tvi; + TV_INSERTSTRUCT tvins; + + ZeroMemory(&tvi, sizeof(tvi)); + ZeroMemory(&tvins, sizeof(tvins)); + + tvi.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + tvi.pszText = lpLabel; + tvi.cchTextMax = wcslen(lpLabel); + tvi.lParam = lParam; + tvi.iImage = DevImage; + tvi.iSelectedImage = DevImage; + + if (OverlayImage != 0) + { + tvi.mask |= TVIF_STATE; + tvi.stateMask = TVIS_OVERLAYMASK; + tvi.state = INDEXTOOVERLAYMASK(OverlayImage); + } + + tvins.item = tvi; + tvins.hParent = hParent; + + return TreeView_InsertItem(m_hTreeView, &tvins); +} diff --git a/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h b/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h index 23729c672e4..e6ca729c56e 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h +++ b/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h @@ -1,12 +1,30 @@ #pragma once #include "Devices.h" +enum ListDevices +{ + DevicesByType, + DevicesByConnection, + ResourcesByType, + ResourcesByConnection +}; + class CDeviceView : public CDevices { + CDevices *m_Devices; HWND m_hMainWnd; HWND m_hTreeView; HWND m_hPropertyDialog; HWND m_hShortcutMenu; + ListDevices m_ListDevices; + + HIMAGELIST m_ImageList; + //HDEVINFO m_hDevInfo; + + HTREEITEM m_hTreeRoot; + + BOOL m_ShowHidden; + BOOL m_ShowUnknown; public: CDeviceView(HWND hMainWnd); @@ -15,9 +33,53 @@ public: BOOL Initialize(); BOOL Uninitialize(); - VOID Size(INT x, INT y, INT cx, INT cy); + VOID Size( + _In_ INT x, + _In_ INT y, + _In_ INT cx, + _In_ INT cy + ); + VOID Refresh(); VOID DisplayPropertySheet(); VOID SetFocus(); + + VOID SetDeviceListType(ListDevices List) + { + m_ListDevices = List; + } + + VOID ShowHiddenDevices(_In_ BOOL ShowHidden) + { + m_ShowHidden = ShowHidden; + } + + VOID ShowUnknownDevices(BOOL ShowUnknown) + { + m_ShowUnknown = ShowUnknown; + } + +private: + static unsigned int __stdcall ListDevicesThread( + void *Param + ); + + BOOL ListDevicesByConnection( + ); + BOOL ListDevicesByType( + ); + + VOID RecurseChildDevices( + _In_ DEVINST ParentDevice, + _In_ HTREEITEM hParentTreeItem + ); + + HTREEITEM InsertIntoTreeView( + _In_ HTREEITEM hParent, + _In_z_ LPWSTR lpLabel, + _In_ LPARAM lParam, + _In_ INT DevImage, + _In_ UINT OverlayImage + ); }; diff --git a/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp b/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp index ddc687e1b6e..8e6e15e8152 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp +++ b/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp @@ -1,12 +1,618 @@ -#include "StdAfx.h" +/* +* PROJECT: ReactOS Device Manager +* LICENSE: GPL - See COPYING in the top level directory +* FILE: base/applications/mscutils/devmgmt/devices.cpp +* PURPOSE: Wrapper around setupapi functions +* COPYRIGHT: Copyright 2014 Ged Murphy +* +*/ + +#include "stdafx.h" +#include "devmgmt.h" #include "Devices.h" - -CDevices::CDevices(void) +CDevices::CDevices(void) : + m_bInitialized(FALSE), + m_RootImageIndex(-1) { -} + ZeroMemory(&m_ImageListData, sizeof(SP_CLASSIMAGELIST_DATA)); + m_RootName[0] = UNICODE_NULL; +} CDevices::~CDevices(void) { + ATLASSERT(m_bInitialized == FALSE); } + +BOOL +CDevices::Initialize() +{ + BOOL bSuccess; + + ATLASSERT(m_bInitialized == FALSE); + + /* Get the device image list */ + m_ImageListData.cbSize = sizeof(SP_CLASSIMAGELIST_DATA); + bSuccess = SetupDiGetClassImageList(&m_ImageListData); + if (bSuccess == FALSE) return FALSE; + + bSuccess = CreateRootDevice(); + if (bSuccess) m_bInitialized = TRUE; + + return m_bInitialized; +} + +BOOL +CDevices::Uninitialize() +{ + if (m_ImageListData.ImageList != NULL) + { + SetupDiDestroyClassImageList(&m_ImageListData); + ZeroMemory(&m_ImageListData, sizeof(SP_CLASSIMAGELIST_DATA)); + } + + m_bInitialized = FALSE; + + return TRUE; +} + +BOOL +CDevices::GetDeviceTreeRoot( + _Out_ LPWSTR RootName, + _In_ DWORD RootNameSize, + _Out_ PINT RootImageIndex + ) +{ + wcscpy_s(RootName, RootNameSize, m_RootName); + *RootImageIndex = m_RootImageIndex; + + return TRUE; +} + +BOOL +CDevices::GetChildDevice( + _In_ DEVINST ParentDevInst, + _Out_ PDEVINST DevInst + ) +{ + CONFIGRET cr; + + cr = CM_Get_Child(DevInst, + ParentDevInst, + 0); + return (cr == CR_SUCCESS); +} + +BOOL +CDevices::GetSiblingDevice( + _In_ DEVINST PrevDevice, + _Out_ PDEVINST DevInst + ) +{ + CONFIGRET cr; + + cr = CM_Get_Sibling(DevInst, + PrevDevice, + 0); + return (cr == CR_SUCCESS); +} + +BOOL +CDevices::GetDeviceStatus( + _In_ LPWSTR DeviceId, + _Out_ PULONG Status, + _Out_ PULONG ProblemNumber + ) +{ + DEVINST DeviceInstance; + CONFIGRET cr; + + *Status = 0; + *ProblemNumber = 0; + + /* Use the device id string to lookup the instance */ + cr = CM_Locate_DevNodeW(&DeviceInstance, + DeviceId, + CM_LOCATE_DEVNODE_NORMAL); + if (cr == CR_SUCCESS) + { + /* Get the status of this device */ + cr = CM_Get_DevNode_Status_Ex(Status, + ProblemNumber, + DeviceInstance, + 0, + NULL); + } + + return (cr == CR_SUCCESS) ? TRUE : FALSE; +} + +BOOL +CDevices::GetDevice( + _In_ DEVINST Device, + _Out_writes_(DeviceNameSize) LPWSTR DeviceName, + _In_ DWORD DeviceNameSize, + _Out_ LPWSTR *DeviceId, + _Out_ PINT ClassImage, + _Out_ LPBOOL IsUnknown, + _Out_ LPBOOL IsHidden + ) +{ + WCHAR ClassGuidString[MAX_GUID_STRING_LEN]; + GUID ClassGuid; + ULONG ulLength; + CONFIGRET cr; + + *DeviceId = NULL; + + cr = CM_Get_Device_ID_Size(&ulLength, Device, 0); + if (cr == CR_SUCCESS) + { + *DeviceId = (LPWSTR)HeapAlloc(GetProcessHeap(), + 0, + (ulLength + 1) * sizeof(WCHAR)); + if (*DeviceId) + { + cr = CM_Get_Device_IDW(Device, + *DeviceId, + ulLength + 1, + 0); + if (cr != CR_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, *DeviceId); + *DeviceId = NULL; + } + } + } + + if (*DeviceId == NULL) + return FALSE; + + + /* Get the class guid for this device */ + ulLength = MAX_GUID_STRING_LEN * sizeof(WCHAR); + cr = CM_Get_DevNode_Registry_PropertyW(Device, + CM_DRP_CLASSGUID, + NULL, + ClassGuidString, + &ulLength, + 0); + if (cr == CR_SUCCESS) + { + CLSIDFromString(ClassGuidString, &ClassGuid); + + if ((IsEqualGUID(ClassGuid, GUID_DEVCLASS_LEGACYDRIVER) || + IsEqualGUID(ClassGuid, GUID_DEVCLASS_VOLUME))) + { + *IsHidden = TRUE; + } + } + else + { + /* It's a device with no driver */ + ClassGuid = GUID_DEVCLASS_UNKNOWN; + *IsUnknown = TRUE; + } + + + SetupDiGetClassImageIndex(&m_ImageListData, + &ClassGuid, + ClassImage); + + + + ulLength = DeviceNameSize * sizeof(WCHAR); + cr = CM_Get_DevNode_Registry_PropertyW(Device, + CM_DRP_FRIENDLYNAME, + NULL, + DeviceName, + &ulLength, + 0); + if (cr != CR_SUCCESS) + { + ulLength = DeviceNameSize * sizeof(WCHAR); + cr = CM_Get_DevNode_Registry_PropertyW(Device, + CM_DRP_DEVICEDESC, + NULL, + DeviceName, + &ulLength, + 0); + + } + + if (cr != CR_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, *DeviceId); + *DeviceId = NULL; + } + + return (cr == CR_SUCCESS ? TRUE : FALSE); +} + +BOOL +CDevices::EnumClasses( + _In_ ULONG ClassIndex, + _Out_writes_bytes_(sizeof(GUID)) LPGUID ClassGuid, + _Out_writes_(ClassNameSize) LPWSTR ClassName, + _In_ DWORD ClassNameSize, + _Out_writes_(ClassDescSize) LPWSTR ClassDesc, + _In_ DWORD ClassDescSize, + _Out_ PINT ClassImage, + _Out_ LPBOOL IsUnknown, + _Out_ LPBOOL IsHidden + ) +{ + DWORD RequiredSize, Type, Size; + CONFIGRET cr; + DWORD Success; + HKEY hKey; + + ClassName[0] = UNICODE_NULL; + ClassDesc[0] = UNICODE_NULL; + *ClassImage = -1; + *IsUnknown = FALSE; + *IsHidden = FALSE; + + /* Get the next class in the list */ + cr = CM_Enumerate_Classes(ClassIndex, + ClassGuid, + 0); + if (cr != CR_SUCCESS) return FALSE; + + /* Get the name of the device class */ + RequiredSize = MAX_CLASS_NAME_LEN; + (VOID)SetupDiClassNameFromGuidW(ClassGuid, + ClassName, + RequiredSize, + &RequiredSize); + + /* Open the registry key for this class */ + hKey = SetupDiOpenClassRegKeyExW(ClassGuid, + MAXIMUM_ALLOWED, + DIOCR_INSTALLER, + NULL, + 0); + if (hKey != INVALID_HANDLE_VALUE) + { + Size = ClassDescSize; + Type = REG_SZ; + + /* Lookup the class description (win7+) */ + Success = RegQueryValueExW(hKey, + L"ClassDesc", + NULL, + &Type, + (LPBYTE)ClassDesc, + &Size); + if (Success == ERROR_SUCCESS) + { + /* Check if the string starts with an @ */ + if (ClassDesc[0] == L'@') + { + /* The description is located in a module resource */ + Success = ConvertResourceDescriptorToString(ClassDesc, ClassDescSize); + } + } + else if (Success == ERROR_FILE_NOT_FOUND) + { + /* WinXP stores the description in the default value */ + Success = RegQueryValueExW(hKey, + NULL, + NULL, + &Type, + (LPBYTE)ClassDesc, + &Size); + } + + /* Close the registry key */ + RegCloseKey(hKey); + } + else + { + Success = GetLastError(); + } + + /* Check if we failed to get the class description */ + if (Success != ERROR_SUCCESS) + { + /* Use the class name as the description */ + wcscpy_s(ClassDesc, ClassDescSize, ClassName); + } + + /* Get the image index for this class */ + (VOID)SetupDiGetClassImageIndex(&m_ImageListData, + ClassGuid, + ClassImage); + + /* Check if this is an unknown device */ + *IsUnknown = IsEqualGUID(*ClassGuid, GUID_DEVCLASS_UNKNOWN); + + /* Check if this is one of the classes we hide by default */ + if (IsEqualGUID(*ClassGuid, GUID_DEVCLASS_LEGACYDRIVER) || + IsEqualGUID(*ClassGuid, GUID_DEVCLASS_VOLUME)) + { + *IsHidden = TRUE; + } + + return TRUE; +} + +BOOL +CDevices::EnumDevicesForClass( + _Inout_opt_ LPHANDLE DeviceHandle, + _In_ LPCGUID ClassGuid, + _In_ DWORD Index, + _Out_ LPBOOL MoreItems, + _Out_ LPTSTR DeviceName, + _In_ DWORD DeviceNameSize, + _Out_ LPTSTR *DeviceId + ) +{ + SP_DEVINFO_DATA DeviceInfoData; + DWORD DevIdSize; + HDEVINFO hDevInfo; + BOOL bUnknown, bSuccess; + + *MoreItems = FALSE; + *DeviceName = NULL; + *DeviceId = NULL; + bUnknown = FALSE; + + /* The unknown class is a special case */ + if (IsEqualGUID(*ClassGuid, GUID_DEVCLASS_UNKNOWN)) + bUnknown = TRUE; + + + /* Check if this is the first call for this class */ + if (*DeviceHandle == NULL) + { + ATLASSERT(Index == 0); + + /* Check for the special case */ + if (bUnknown == TRUE) + { + /* Get device info for all devices for all classes */ + hDevInfo = SetupDiGetClassDevsW(NULL, + NULL, + NULL, + DIGCF_ALLCLASSES); + if (hDevInfo == INVALID_HANDLE_VALUE) + return FALSE; + } + else + { + /* We only want the devices for this class */ + hDevInfo = SetupDiGetClassDevsW(ClassGuid, + NULL, + NULL, + DIGCF_PRESENT); + if (hDevInfo == INVALID_HANDLE_VALUE) + return FALSE; + } + + /* Store the handle for the next call */ + *DeviceHandle = (HANDLE)hDevInfo; + } + else + { + hDevInfo = (HDEVINFO)*DeviceHandle; + } + + + /* Get the device info for this device in the class */ + ZeroMemory(&DeviceInfoData, sizeof(SP_DEVINFO_DATA)); + DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); + bSuccess = SetupDiEnumDeviceInfo(hDevInfo, + Index, + &DeviceInfoData); + if (bSuccess == FALSE) goto Quit; + + + + /* We found a device, let the caller know they might be more */ + *MoreItems = TRUE; + + /* Check if this is the unknown class */ + if (bUnknown) + { + /* We're looking for devices without guids */ + if (IsEqualGUID(DeviceInfoData.ClassGuid, GUID_NULL) == FALSE) + { + /* This is a known device, we aren't interested in it */ + return FALSE; + } + } + + /* Get the size required to hold the device id */ + bSuccess = SetupDiGetDeviceInstanceIdW(hDevInfo, + &DeviceInfoData, + NULL, + 0, + &DevIdSize); + if (bSuccess == FALSE && (GetLastError() != ERROR_INSUFFICIENT_BUFFER)) + goto Quit; + + /* Allocate some heap to hold the device string */ + *DeviceId = (LPTSTR)HeapAlloc(GetProcessHeap(), + 0, + DevIdSize * sizeof(WCHAR)); + if (*DeviceId == NULL) goto Quit; + + /* Now get the device id string */ + bSuccess = SetupDiGetDeviceInstanceIdW(hDevInfo, + &DeviceInfoData, + *DeviceId, + DevIdSize, + NULL); + if (bSuccess == FALSE) goto Quit; + + + /* Skip the root device */ + if (*DeviceId != NULL && + wcscmp(*DeviceId, L"HTREE\\ROOT\\0") == 0) + { + bSuccess = FALSE; + goto Quit; + } + + /* Get the device's friendly name */ + bSuccess = SetupDiGetDeviceRegistryPropertyW(hDevInfo, + &DeviceInfoData, + SPDRP_FRIENDLYNAME, + 0, + (BYTE*)DeviceName, + 256, + NULL); + if (bSuccess == FALSE) + { + /* if the friendly name fails, try the description instead */ + bSuccess = SetupDiGetDeviceRegistryPropertyW(hDevInfo, + &DeviceInfoData, + SPDRP_DEVICEDESC, + 0, + (BYTE*)DeviceName, + 256, + NULL); + } + + /* If we didn't find a name, check if this is an unknown device */ + if (bSuccess == FALSE && bUnknown == TRUE) + { + /* We add in our own text */ + wcscpy_s(DeviceName, 256, L"Unknown device"); + bSuccess = TRUE; + } + +Quit: + if (MoreItems == FALSE) + SetupDiDestroyDeviceInfoList(hDevInfo); + + if (bSuccess == FALSE) + { + if (*DeviceId) + { + HeapFree(GetProcessHeap(), 0, *DeviceId); + *DeviceId = NULL; + } + } + + return bSuccess; +} + + +/* PRIVATE METHODS ******************************************/ + +BOOL +CDevices::CreateRootDevice() +{ + HBITMAP hRootImage = NULL; + DWORD Size = ROOT_NAME_SIZE; + BOOL bSuccess = FALSE; + CONFIGRET cr; + + /* The root name is the computer name */ + (VOID)GetComputerNameW(m_RootName, &Size); + + /* Load the bitmap we'll be using as the root image */ + hRootImage = LoadBitmapW(g_hInstance, + MAKEINTRESOURCEW(IDB_ROOT_IMAGE)); + if (hRootImage == NULL) goto Cleanup; + + /* Add this bitmap to the device image list. This is a bit hacky, but it's safe */ + m_RootImageIndex = ImageList_Add(m_ImageListData.ImageList, + hRootImage, + NULL); + if (m_RootImageIndex == -1) + goto Cleanup; + + /* Get the root instance */ + cr = CM_Locate_DevNodeW(&m_RootDevInst, + NULL, + CM_LOCATE_DEVNODE_NORMAL); + if (cr == CR_SUCCESS) + bSuccess = TRUE; + +Cleanup: + if (bSuccess == FALSE) + { + SetupDiDestroyClassImageList(&m_ImageListData); + ZeroMemory(&m_ImageListData, sizeof(SP_CLASSIMAGELIST_DATA)); + } + + if (hRootImage) DeleteObject(hRootImage); + + return bSuccess; +} + + +DWORD +CDevices::ConvertResourceDescriptorToString( + _Inout_z_ LPWSTR ResourceDescriptor, + _In_ DWORD ResourceDescriptorSize + ) +{ + WCHAR ModulePath[MAX_PATH]; + WCHAR ResString[256]; + INT ResourceId; + HMODULE hModule; + LPWSTR ptr; + DWORD Size; + DWORD dwError; + + + /* First check for a semi colon */ + ptr = wcschr(ResourceDescriptor, L';'); + if (ptr) + { + /* This must be an inf based descriptor, the desc is after the semi colon */ + wcscpy_s(ResourceDescriptor, ResourceDescriptorSize, ++ptr); + dwError = ERROR_SUCCESS; + } + else + { + /* This must be a dll resource based descriptor. Find the comma */ + ptr = wcschr(ResourceDescriptor, L','); + if (ptr == NULL) return ERROR_INVALID_DATA; + + /* Terminate the string where the comma was */ + *ptr = UNICODE_NULL; + + /* Expand any environment strings */ + Size = ExpandEnvironmentStringsW(&ResourceDescriptor[1], ModulePath, MAX_PATH); + if (Size > MAX_PATH) return ERROR_BUFFER_OVERFLOW; + if (Size == 0) return GetLastError(); + + /* Put the comma back and move past it */ + *ptr = L','; + ptr++; + + /* Load the dll */ + hModule = LoadLibraryExW(ModulePath, NULL, LOAD_LIBRARY_AS_DATAFILE); + if (hModule == NULL) return GetLastError(); + + /* Convert the resource id to a number */ + ResourceId = _wtoi(ptr); + + /* If the number is negative, make it positive */ + if (ResourceId < 0) ResourceId = -ResourceId; + + /* Load the string from the dll */ + if (LoadStringW(hModule, ResourceId, ResString, 256)) + { + wcscpy_s(ResourceDescriptor, ResourceDescriptorSize, ResString); + dwError = ERROR_SUCCESS; + } + else + { + dwError = GetLastError(); + } + + /* Free the library */ + FreeLibrary(hModule); + } + + return dwError; +} + + diff --git a/reactos/base/applications/mscutils/devmgmt_new/Devices.h b/reactos/base/applications/mscutils/devmgmt_new/Devices.h index e0735162ba6..9cd6988ff76 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/Devices.h +++ b/reactos/base/applications/mscutils/devmgmt_new/Devices.h @@ -1,8 +1,98 @@ #pragma once + +#define ROOT_NAME_SIZE MAX_COMPUTERNAME_LENGTH + 1 + class CDevices { +private: + SP_CLASSIMAGELIST_DATA m_ImageListData; + BOOL m_bInitialized; + + DEVINST m_RootDevInst; + WCHAR m_RootName[ROOT_NAME_SIZE]; + INT m_RootImageIndex; + public: CDevices(void); ~CDevices(void); + + BOOL Initialize( + ); + + BOOL Uninitialize( + ); + + BOOL GetDeviceTreeRoot( + _Out_ LPWSTR RootName, + _In_ DWORD RootNameSize, + _Out_ PINT RootImageIndex + ); + + BOOL GetChildDevice( + _In_ DEVINST ParentDevInst, + _Out_ PDEVINST DevInst + ); + + BOOL GetSiblingDevice( + _In_ DEVINST PrevDevice, + _Out_ PDEVINST DevInst + ); + + BOOL GetDevice( + _In_ DEVINST Device, + _Out_writes_(DeviceNameSize) LPTSTR DeviceName, + _In_ DWORD DeviceNameSize, + _Out_ LPTSTR *DeviceId, + _Out_ PINT ClassImage, + _Out_ LPBOOL IsUnknown, + _Out_ LPBOOL IsHidden + ); + + BOOL EnumClasses( + _In_ ULONG ClassIndex, + _Out_writes_bytes_(sizeof(GUID)) LPGUID ClassGuid, + _Out_writes_(ClassNameSize) LPWSTR ClassName, + _In_ DWORD ClassNameSize, + _Out_writes_(ClassDescSize) LPWSTR ClassDesc, + _In_ DWORD ClassDescSize, + _Out_ PINT ClassImage, + _Out_ LPBOOL IsUnknown, + _Out_ LPBOOL IsHidden + ); + + BOOL EnumDevicesForClass( + _Inout_opt_ LPHANDLE DeviceHandle, + _In_ LPCGUID ClassGuid, + _In_ DWORD Index, + _Out_ LPBOOL MoreItems, + _Out_writes_(DeviceNameSize) LPTSTR DeviceName, + _In_ DWORD DeviceNameSize, + _Out_ LPTSTR *DeviceId + ); + + BOOL GetDeviceStatus( + _In_ LPWSTR DeviceId, + _Out_ PULONG pulStatus, + _Out_ PULONG pulProblemNumber + ); + + + HIMAGELIST GetImageList() { return m_ImageListData.ImageList; } + DEVINST GetRootDevice() { return m_RootDevInst; } + +private: + BOOL CreateImageList( + ); + + BOOL CreateRootDevice( + ); + + + DWORD ConvertResourceDescriptorToString( + _Inout_z_ LPWSTR ResourceDescriptor, + _In_ DWORD ResourceDescriptorSize + ); + + }; diff --git a/reactos/base/applications/mscutils/devmgmt_new/MainWindow.cpp b/reactos/base/applications/mscutils/devmgmt_new/MainWindow.cpp index 4b24304096b..3dbfc0a5c41 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/MainWindow.cpp +++ b/reactos/base/applications/mscutils/devmgmt_new/MainWindow.cpp @@ -1,7 +1,19 @@ -#include "StdAfx.h" +/* +* PROJECT: ReactOS Device Manager +* LICENSE: GPL - See COPYING in the top level directory +* FILE: base/applications/mscutils/devmgmt/deviceview.cpp +* PURPOSE: Implements main window +* COPYRIGHT: Copyright 2014 Ged Murphy +* +*/ + +#include "stdafx.h" #include "devmgmt.h" #include "MainWindow.h" + +/* DATA *****************************************************/ + /* menu hints */ static const MENU_HINT MainMenuHintTable[] = { @@ -12,7 +24,13 @@ static const MENU_HINT MainMenuHintTable[] = {IDC_REFRESH, IDS_HINT_REFRESH}, {IDC_PROP, IDS_HINT_PROP}, - {IDC_ABOUT, IDS_HINT_ABOUT} + {IDC_ABOUT, IDS_HINT_ABOUT}, + + {IDC_DEVBYTYPE, IDS_HINT_DEV_BY_TYPE}, + {IDC_DEVBYCONN, IDS_HINT_DEV_BY_CONN}, + {IDC_RESBYTYPE, IDS_HINT_RES_BY_TYPE}, + {IDC_RESBYCONN, IDS_HINT_RES_BY_TYPE} + }; /* system menu hints */ @@ -27,8 +45,10 @@ static const MENU_HINT SystemMenuHintTable[] = }; +/* PUBLIC METHODS **********************************************/ CMainWindow::CMainWindow(void) : + m_ToolbarhImageList(NULL), m_hMainWnd(NULL), m_hStatusBar(NULL), m_hToolBar(NULL), @@ -39,6 +59,116 @@ CMainWindow::CMainWindow(void) : CMainWindow::~CMainWindow(void) { + /* Destroy any previous list */ + if (m_ToolbarhImageList) ImageList_Destroy(m_ToolbarhImageList); +} + +BOOL +CMainWindow::Initialize(LPCTSTR lpCaption, + int nCmdShow) +{ + CAtlString szCaption; + WNDCLASSEXW wc = {0}; + + /* Store the show window value */ + m_CmdShow = nCmdShow; + + /* Setup the window class struct */ + wc.cbSize = sizeof(WNDCLASSEXW); + wc.lpfnWndProc = MainWndProc; + wc.hInstance = g_hInstance; + wc.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCEW(IDI_MAIN_ICON)); + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); + wc.lpszMenuName = MAKEINTRESOURCEW(IDR_MAINMENU); + wc.lpszClassName = m_szMainWndClass; + wc.hIconSm = (HICON)LoadImage(g_hInstance, + MAKEINTRESOURCE(IDI_MAIN_ICON), + IMAGE_ICON, + 16, + 16, + LR_SHARED); + + /* Register the window */ + if (RegisterClassExW(&wc)) + { + /* Create the main window and store the info pointer */ + m_hMainWnd = CreateWindowExW(WS_EX_WINDOWEDGE, + m_szMainWndClass, + lpCaption, + WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, + CW_USEDEFAULT, + CW_USEDEFAULT, + 600, + 450, + NULL, + NULL, + g_hInstance, + this); + if (m_hMainWnd) + { + m_hMenu = GetMenu(m_hMainWnd); + } + } + + /* Return creation result */ + return !!(m_hMainWnd); +} + +VOID +CMainWindow::Uninitialize() +{ + /* Unregister the window class */ + UnregisterClassW(m_szMainWndClass, g_hInstance); +} + +INT +CMainWindow::Run() +{ + MSG Msg; + + /* Pump the message queue */ + while (GetMessageW(&Msg, NULL, 0, 0 ) != 0) + { + TranslateMessage(&Msg); + DispatchMessageW(&Msg); + } + + return 0; +} + + +/* PRIVATE METHODS **********************************************/ + + +BOOL +CMainWindow::MainWndMenuHint(WORD CmdId, + const MENU_HINT *HintArray, + DWORD HintsCount, + UINT DefHintId) +{ + BOOL Found = FALSE; + const MENU_HINT *LastHint; + UINT HintId = DefHintId; + + LastHint = HintArray + HintsCount; + while (HintArray != LastHint) + { + if (HintArray->CmdId == CmdId) + { + HintId = HintArray->HintId; + Found = TRUE; + break; + } + HintArray++; + } + + StatusBarLoadString(m_hStatusBar, + SB_SIMPLEID, + g_hInstance, + HintId); + + return Found; } BOOL @@ -59,7 +189,7 @@ CMainWindow::CreateToolBar() {15, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, }; - /* Get the number of buttons */ + /* Calculate the number of buttons */ NumButtons = sizeof(ToolbarButtons) / sizeof(ToolbarButtons[0]); /* Create the toolbar window */ @@ -72,71 +202,69 @@ CMainWindow::CreateToolBar() (HMENU)IDC_TOOLBAR, g_hInstance, NULL); - if (m_hToolBar) + if (m_hToolBar == NULL) return FALSE; + + /* Don't show clipped buttons */ + SendMessageW(m_hToolBar, + TB_SETEXTENDEDSTYLE, + 0, + TBSTYLE_EX_HIDECLIPPEDBUTTONS); + + /* Set the struct size, the toobar needs this... */ + SendMessageW(m_hToolBar, + TB_BUTTONSTRUCTSIZE, + sizeof(ToolbarButtons[0]), + 0); + + /* Create the toolbar icon image list */ + m_ToolbarhImageList = ImageList_Create(16, + 16, + ILC_MASK | ILC_COLOR24, + NumButtons, + 0); + if (m_ToolbarhImageList == NULL) return FALSE; + + /* Set the index endpoints */ + StartResource = IDB_PROP; + EndResource = IDB_REFRESH; + + /* Add all icons to the image list */ + for (UINT i = StartResource; i <= EndResource; i++) { - /* Don't show clipped buttons */ - SendMessageW(m_hToolBar, - TB_SETEXTENDEDSTYLE, - 0, - TBSTYLE_EX_HIDECLIPPEDBUTTONS); - - /* Set the struct size, the toobar needs this... */ - SendMessageW(m_hToolBar, - TB_BUTTONSTRUCTSIZE, - sizeof(ToolbarButtons[0]), - 0); - - /* Create the toolbar icon image list */ - hImageList = ImageList_Create(16, - 16, - ILC_MASK | ILC_COLOR24, - NumButtons, - 0); - if (hImageList) + /* Load the image resource */ + hBitmap = (HBITMAP)LoadImage(g_hInstance, + MAKEINTRESOURCE(i), + IMAGE_BITMAP, + 16, + 16, + LR_LOADTRANSPARENT); + if (hBitmap) { - /* Set the index endpoints */ - StartResource = IDB_PROP; - EndResource = IDB_REFRESH; + /* Add it to the image list */ + ImageList_AddMasked(m_ToolbarhImageList, + hBitmap, + RGB(255, 0, 128)); - /* Add all icons to the image list */ - for (UINT i = StartResource; i <= EndResource; i++) - { - /* Load the image resource */ - hBitmap = (HBITMAP)LoadImage(g_hInstance, - MAKEINTRESOURCE(i), - IMAGE_BITMAP, - 16, - 16, - LR_LOADTRANSPARENT); - if (hBitmap) - { - /* Add it to the image list */ - ImageList_AddMasked(hImageList, - hBitmap, - RGB(255, 0, 128)); - - /* Delete the bitmap */ - DeleteObject(hBitmap); - } - } - - /* Set the new image list */ - hImageList = (HIMAGELIST)SendMessageW(m_hToolBar, - TB_SETIMAGELIST, - 0, - (LPARAM)hImageList); - - /* Destroy any previous list */ - if (hImageList) ImageList_Destroy(hImageList); - - /* Add the buttons */ - bRet = (BOOL)SendMessageW(m_hToolBar, - TB_ADDBUTTONS, - NumButtons, - (LPARAM)ToolbarButtons); + /* Delete the bitmap */ + DeleteObject(hBitmap); } } + /* Set the new image list */ + hImageList = (HIMAGELIST)SendMessageW(m_hToolBar, + TB_SETIMAGELIST, + 0, + (LPARAM)m_ToolbarhImageList); + + /* Destroy any previous list */ + if (hImageList) ImageList_Destroy(hImageList); + + /* Add the buttons */ + bRet = (BOOL)SendMessageW(m_hToolBar, + TB_ADDBUTTONS, + NumButtons, + (LPARAM)ToolbarButtons); + return bRet; } @@ -159,10 +287,10 @@ CMainWindow::CreateStatusBar() if (m_hStatusBar) { /* Set the width */ - bRet = (BOOL)SendMessage(m_hStatusBar, - SB_SETPARTS, - sizeof(StatWidths) / sizeof(INT), - (LPARAM)StatWidths); + bRet = (BOOL)SendMessageW(m_hStatusBar, + SB_SETPARTS, + sizeof(StatWidths) / sizeof(INT), + (LPARAM)StatWidths); } return bRet; @@ -182,9 +310,9 @@ CMainWindow::StatusBarLoadString(IN HWND hStatusBar, { /* Send the message to the status bar */ bRet = (BOOL)SendMessageW(hStatusBar, - SB_SETTEXT, - (WPARAM)PartId, - (LPARAM)szMessage.GetBuffer()); + SB_SETTEXT, + (WPARAM)PartId, + (LPARAM)szMessage.GetBuffer()); } return bRet; @@ -202,23 +330,19 @@ CMainWindow::OnCreate(HWND hwnd) m_hMainWnd = hwnd; /* Create the toolbar */ - if (CreateToolBar()) + if (CreateToolBar() && CreateStatusBar()) { - /* Create the statusbar */ - if (CreateStatusBar()) + /* Create the device view object */ + m_DeviceView = new CDeviceView(m_hMainWnd); + + /* Initialize it */ + if (m_DeviceView->Initialize()) { - /* Create the device view object */ - m_DeviceView = new CDeviceView(m_hMainWnd); + /* Display the window according to the user request */ + ShowWindow(hwnd, m_CmdShow); - /* Initialize it */ - if (m_DeviceView->Initialize()) - { - /* Display the window according to the user request */ - ShowWindow(hwnd, m_CmdShow); - - /* Set as handled */ - RetCode = 0; - } + /* Set as handled */ + RetCode = 0; } } @@ -263,6 +387,31 @@ CMainWindow::OnSize() LRESULT CMainWindow::OnNotify(LPARAM lParam) { + LPNMHDR NmHdr = (LPNMHDR)lParam; + + switch (NmHdr->code) + { + case TVN_DELETEITEMW: + { + LPNMTREEVIEW NmTreeView = (LPNMTREEVIEW)lParam; + + NmTreeView->action = NmTreeView->action; + + break; + } + + case NM_DBLCLK: + { + m_DeviceView->DisplayPropertySheet(); + break; + } + + case NM_RETURN: + { + m_DeviceView->DisplayPropertySheet(); + break; + } + } return 0; } @@ -299,13 +448,69 @@ CMainWindow::OnCommand(WPARAM wParam, break; } + case IDC_DEVBYTYPE: + { + m_DeviceView->SetDeviceListType(DevicesByType); + CheckMenuRadioItem(m_hMenu, + IDC_DEVBYTYPE, + IDC_RESBYCONN, + IDC_DEVBYTYPE, + MF_BYCOMMAND); + m_DeviceView->Refresh(); + } + break; + + case IDC_DEVBYCONN: + { + m_DeviceView->SetDeviceListType(DevicesByConnection); + CheckMenuRadioItem(m_hMenu, + IDC_DEVBYTYPE, + IDC_RESBYCONN, + IDC_DEVBYCONN, + MF_BYCOMMAND); + m_DeviceView->Refresh(); + } + break; + + case IDC_SHOWHIDDEN: + { + UINT CurCheckState, NewCheckState; + + /* Get the current state */ + CurCheckState = GetMenuState(m_hMenu, IDC_SHOWHIDDEN, MF_BYCOMMAND); + + /* Inform the device view of the change */ + if (CurCheckState == MF_CHECKED) + { + NewCheckState = MF_UNCHECKED; + m_DeviceView->ShowHiddenDevices(FALSE); + } + else if (CurCheckState == MF_UNCHECKED) + { + NewCheckState = MF_CHECKED; + m_DeviceView->ShowHiddenDevices(TRUE); + } + else + { + ATLASSERT(FALSE); + break; + } + + /* Set the new check state */ + CheckMenuItem(m_hMenu, IDC_SHOWHIDDEN, MF_BYCOMMAND | NewCheckState); + + /* Refresh the device view */ + m_DeviceView->Refresh(); + break; + } + case IDC_ABOUT: { - /* Blow my own trumpet */ + /* Apportion blame */ MessageBoxW(m_hMainWnd, - L"ReactOS Device Manager\r\nCopyright Ged Murphy 2011", + L"ReactOS Device Manager\r\nCopyright Ged Murphy 2014", L"About", - MB_OK); + MB_OK | MB_APPLMODAL); /* Set focus back to the treeview */ m_DeviceView->SetFocus(); @@ -361,7 +566,7 @@ CMainWindow::MainWndProc(HWND hwnd, pThis = (CMainWindow *)GetWindowLongPtr(hwnd, GWLP_USERDATA); /* Check for an invalid pointer */ - if (!pThis) + if (pThis == NULL) { /* Check that this isn't a create message */ if (msg != WM_CREATE) @@ -406,6 +611,25 @@ CMainWindow::MainWndProc(HWND hwnd, break; } + case WM_MENUSELECT: + { + if (pThis->m_hStatusBar != NULL) + { + if (!pThis->MainWndMenuHint(LOWORD(wParam), + MainMenuHintTable, + sizeof(MainMenuHintTable) / sizeof(MainMenuHintTable[0]), + IDS_HINT_BLANK)) + { + pThis->MainWndMenuHint(LOWORD(wParam), + SystemMenuHintTable, + sizeof(SystemMenuHintTable) / sizeof(SystemMenuHintTable[0]), + IDS_HINT_BLANK); + } + } + + break; + } + case WM_COMMAND: { /* Handle the command message */ @@ -439,73 +663,3 @@ HandleDefaultMessage: return RetCode; } - -BOOL -CMainWindow::Initialize(LPCTSTR lpCaption, - int nCmdShow) -{ - CAtlString szCaption; - WNDCLASSEXW wc = {0}; - - /* Store the show window value */ - m_CmdShow = nCmdShow; - - /* Setup the window class struct */ - wc.cbSize = sizeof(WNDCLASSEXW); - wc.lpfnWndProc = MainWndProc; - wc.hInstance = g_hInstance; - wc.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCEW(IDI_MAIN_ICON)); - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.lpszMenuName = MAKEINTRESOURCEW(IDR_MAINMENU); - wc.lpszClassName = m_szMainWndClass; - wc.hIconSm = (HICON)LoadImage(g_hInstance, - MAKEINTRESOURCE(IDI_MAIN_ICON), - IMAGE_ICON, - 16, - 16, - LR_SHARED); - - /* Register the window */ - if (RegisterClassExW(&wc)) - { - /* Create the main window and store the info pointer */ - m_hMainWnd = CreateWindowExW(WS_EX_WINDOWEDGE, - m_szMainWndClass, - lpCaption, - WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, - CW_USEDEFAULT, - CW_USEDEFAULT, - 600, - 450, - NULL, - NULL, - g_hInstance, - this); - } - - /* Return creation result */ - return !!(m_hMainWnd); -} - -VOID -CMainWindow::Uninitialize() -{ - /* Unregister the window class */ - UnregisterClassW(m_szMainWndClass, g_hInstance); -} - -INT -CMainWindow::Run() -{ - MSG Msg; - - /* Pump the message queue */ - while (GetMessageW(&Msg, NULL, 0, 0 ) != 0) - { - TranslateMessage(&Msg); - DispatchMessageW(&Msg); - } - - return 0; -} \ No newline at end of file diff --git a/reactos/base/applications/mscutils/devmgmt_new/MainWindow.h b/reactos/base/applications/mscutils/devmgmt_new/MainWindow.h index b8f74e51972..a9bf229a767 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/MainWindow.h +++ b/reactos/base/applications/mscutils/devmgmt_new/MainWindow.h @@ -14,6 +14,8 @@ class CMainWindow HWND m_hMainWnd; HWND m_hStatusBar; HWND m_hToolBar; + HIMAGELIST m_ToolbarhImageList; + HMENU m_hMenu; int m_CmdShow; private: @@ -29,6 +31,10 @@ private: BOOL CreateToolBar(); BOOL CreateStatusBar(); BOOL StatusBarLoadString(HWND hStatusBar, INT PartId, HINSTANCE hInstance, UINT uID); + BOOL MainWndMenuHint(WORD CmdId, + const MENU_HINT *HintArray, + DWORD HintsCount, + UINT DefHintId); public: CMainWindow(void); @@ -38,6 +44,5 @@ public: INT Run(); VOID Uninitialize(); - }; diff --git a/reactos/base/applications/mscutils/devmgmt_new/Resource.h b/reactos/base/applications/mscutils/devmgmt_new/Resource.h index 9d6feb50932..c3034c3e437 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/Resource.h +++ b/reactos/base/applications/mscutils/devmgmt_new/Resource.h @@ -19,12 +19,15 @@ #define IDR_MAINMENU 102 #define IDR_POPUP 103 #define IDC_DEVBYTYPE 104 +#define IDC_DEVBYCONN 105 +#define IDC_RESBYTYPE 106 +#define IDC_RESBYCONN 107 +#define IDC_SHOWHIDDEN 108 /* tooltips */ #define IDS_TOOLTIP_PROP 6000 #define IDS_TOOLTIP_REFRESH 6001 #define IDS_TOOLTIP_HELP 6002 -#define IDS_TOOLTIP_EXIT 6003 /* button bitmaps */ #define IDB_PROP 10000 @@ -34,7 +37,6 @@ #define TBICON_PROP 0 #define TBICON_REFRESH 1 #define TBICON_HELP 2 -#define TBICON_EXIT 3 /* about box info */ #define IDD_ABOUTBOX 200 @@ -51,6 +53,11 @@ #define IDS_HINT_ABOUT 20005 #define IDS_HINT_EXIT 20006 +#define IDS_HINT_DEV_BY_TYPE 20020 +#define IDS_HINT_DEV_BY_CONN 20021 +#define IDS_HINT_RES_BY_TYPE 20022 +#define IDS_HINT_RES_BY_CONN 20023 + /* system menu hints */ #define IDS_HINT_SYS_RESTORE 21001 #define IDS_HINT_SYS_MOVE 21002 diff --git a/reactos/base/applications/mscutils/devmgmt_new/devmgmt.cpp b/reactos/base/applications/mscutils/devmgmt_new/devmgmt.cpp index 7795c771a92..e22c44620fe 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/devmgmt.cpp +++ b/reactos/base/applications/mscutils/devmgmt_new/devmgmt.cpp @@ -19,12 +19,12 @@ wWinMain(HINSTANCE hThisInstance, int Ret = 1; /* Check if the app is already running */ - hMutex = CreateMutexW(NULL, TRUE, L"devmgmt_mutex"); + hMutex = CreateMutexW(NULL, TRUE, L"devmgmt_mutex2"); if (hMutex == NULL || GetLastError() == ERROR_ALREADY_EXISTS) { /* Cleanup and exit */ - if (hMutex) CloseHandle(hMutex); - return 0; + //if (hMutex) CloseHandle(hMutex); + //return 0; } /* Store the global values */ @@ -40,8 +40,7 @@ wWinMain(HINSTANCE hThisInstance, if (szAppName.LoadStringW(g_hInstance, IDS_APPNAME)) { /* Initialize the main window */ - if (MainWindow.Initialize(szAppName, - nCmdShow)) + if (MainWindow.Initialize(szAppName, nCmdShow)) { /* Run the application */ Ret = MainWindow.Run(); diff --git a/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln b/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln index 9efc23a2901..4dfdd1bd018 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln +++ b/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln @@ -1,7 +1,14 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "devmgmt_new", "devmgmt_new.vcxproj", "{A5AB2C1A-A085-4A2A-951C-F3CF22DA2890}" +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "devmgmt_new", "devmgmt_new.vcxproj", "{47B3358F-E7C3-4D02-9310-68813B9292E0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9ED8D860-F1E9-4F32-8EE7-D8BAEC9BF319}" + ProjectSection(SolutionItems) = preProject + Performance1.psess = Performance1.psess + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,12 +16,17 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A5AB2C1A-A085-4A2A-951C-F3CF22DA2890}.Debug|Win32.ActiveCfg = Debug|Win32 - {A5AB2C1A-A085-4A2A-951C-F3CF22DA2890}.Debug|Win32.Build.0 = Debug|Win32 - {A5AB2C1A-A085-4A2A-951C-F3CF22DA2890}.Release|Win32.ActiveCfg = Release|Win32 - {A5AB2C1A-A085-4A2A-951C-F3CF22DA2890}.Release|Win32.Build.0 = Release|Win32 + {47B3358F-E7C3-4D02-9310-68813B9292E0}.Debug|Win32.ActiveCfg = Debug|Win32 + {47B3358F-E7C3-4D02-9310-68813B9292E0}.Debug|Win32.Build.0 = Debug|Win32 + {47B3358F-E7C3-4D02-9310-68813B9292E0}.Debug|Win32.Deploy.0 = Debug|Win32 + {47B3358F-E7C3-4D02-9310-68813B9292E0}.Release|Win32.ActiveCfg = Release|Win32 + {47B3358F-E7C3-4D02-9310-68813B9292E0}.Release|Win32.Build.0 = Release|Win32 + {47B3358F-E7C3-4D02-9310-68813B9292E0}.Release|Win32.Deploy.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(Performance) = preSolution + HasPerformanceSessions = true + EndGlobalSection EndGlobal diff --git a/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj b/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj index 489cc3a531d..4d3fce73f68 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj +++ b/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -11,7 +11,7 @@ - {A5AB2C1A-A085-4A2A-951C-F3CF22DA2890} + {47B3358F-E7C3-4D02-9310-68813B9292E0} Win32Proj devmgmt_new @@ -19,15 +19,15 @@ Application true + v120_xp Unicode - Static Application false + v120_xp true Unicode - Static @@ -47,7 +47,8 @@ - Use + + Level3 Disabled WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) @@ -55,13 +56,17 @@ Windows true - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;setupapi.lib;%(AdditionalDependencies) + + LANGUAGE_EN_US;%(PreprocessorDefinitions) + Level3 - Use + + MaxSpeed true true @@ -72,8 +77,16 @@ true true true + comctl32.lib;setupapi.lib;%(AdditionalDependencies) + + + + + + + @@ -82,16 +95,6 @@ - - - - - - - Create - Create - - diff --git a/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj.filters b/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj.filters new file mode 100644 index 00000000000..158d5a20242 --- /dev/null +++ b/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj.filters @@ -0,0 +1,59 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc index b2ec272c453..702ffe69337 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "" IDS_TOOLTIP_REFRESH "" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME " " IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/de-DE.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/de-DE.rc index 9fcd99f6f7a..687823e40ec 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/de-DE.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/de-DE.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Dieses Programm ist kostenlos; Sie knnen es frei verteilen mit od. ohne nderungen unter der GNU Lesser General Public License, wie es von der Free Software Foundation verffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine sptere Version (ihrer Wahl).\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Eigenschaften" IDS_TOOLTIP_REFRESH "Aktualisieren" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "ReactOS Gerte-Manager" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/el-GR.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/el-GR.rc index 9280afabc4c..9e0d61c3ff2 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/el-GR.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/el-GR.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "" IDS_TOOLTIP_REFRESH "" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME " ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/en-US.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/en-US.rc index d66316605fc..251101b3fd1 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/en-US.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/en-US.rc @@ -4,24 +4,27 @@ IDR_MAINMENU MENU BEGIN POPUP "&File" BEGIN - MENUITEM "E&xit", IDC_EXIT + MENUITEM "E&xit", IDC_EXIT END POPUP "Action" BEGIN - MENUITEM "Print", IDC_PRINT, GRAYED + MENUITEM "Scan for hardware changes" IDC_REFRESH + MENUITEM "Print", IDC_PRINT, GRAYED MENUITEM SEPARATOR - MENUITEM "Properties", IDC_PROP, GRAYED + MENUITEM "Properties", IDC_PROP, GRAYED END POPUP "View" BEGIN - MENUITEM "Devices by type", IDC_DEVBYTYPE, CHECKED - MENUITEM "Devices by connection", IDC_STATIC, GRAYED - MENUITEM "Resources by type", IDC_STATIC, GRAYED - MENUITEM "Resources by connection", IDC_STATIC, GRAYED + MENUITEM "Devices by type", IDC_DEVBYTYPE + MENUITEM "Devices by connection", IDC_DEVBYCONN + MENUITEM "Resources by type", IDC_RESBYTYPE, GRAYED + MENUITEM "Resources by connection", IDC_RESBYCONN, GRAYED + MENUITEM SEPARATOR + MENUITEM "Show hidden devices", IDC_SHOWHIDDEN END POPUP "Help" BEGIN - MENUITEM "About", IDC_ABOUT + MENUITEM "About", IDC_ABOUT END END @@ -29,7 +32,7 @@ IDR_POPUP MENU BEGIN POPUP "popup" BEGIN - MENUITEM "Properties", IDC_PROP, GRAYED + MENUITEM "Properties", IDC_PROP, GRAYED END END @@ -38,36 +41,40 @@ CAPTION "About Device Manager" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Device Manager v0.1\nCopyright (C) 2006\nby Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 30 + LTEXT "Device Manager v0.2\nCopyright (C) 2012\nby Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 130, 30 PUSHBUTTON "Close", IDOK, 75, 162, 44, 15 ICON IDI_MAIN_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Properties" - IDS_TOOLTIP_REFRESH "Refresh" + IDS_TOOLTIP_REFRESH "Scan for hardware changes" IDS_TOOLTIP_HELP "Help" - IDS_TOOLTIP_EXIT "Exit" END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN - IDS_APPNAME "ReactOS Device Manager" + IDS_APPNAME "ReactOS Device Manager" IDS_HINT_BLANK " " IDS_HINT_EXIT " Exits the program." - IDS_HINT_REFRESH " Refresh the service list." - IDS_HINT_PROP " Open property sheet for the current selection." + IDS_HINT_REFRESH " Scan for changed or new Plug and Play devices." + IDS_HINT_PROP " Open property dialog for the current selection." IDS_HINT_HELP " Display help window." IDS_HINT_ABOUT " About ReactOS Device Manager." + IDS_HINT_DEV_BY_TYPE "Displays devices by hardware type" + IDS_HINT_DEV_BY_CONN "Displays devices by connection" + IDS_HINT_RES_BY_TYPE "Diaplays resources by type" + IDS_HINT_RES_BY_CONN "Displays resources by connection type" + IDS_HINT_SYS_RESTORE " Restores this window to normal size." IDS_HINT_SYS_MOVE " Moves this window." IDS_HINT_SYS_SIZE " Resizes this window." diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/es-ES.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/es-ES.rc index b490e3b3f6d..19ea7fc332f 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/es-ES.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/es-ES.rc @@ -1,6 +1,6 @@ /* - * Spanish Language resource file - * Traducido por: Javier Remacha <2007-12-21> e Ismael Ferreras Morezuelas <2014-11-07> + *Spanish Language resource file + * Traducido por: Javier Remacha 2007-12-21 */ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL @@ -38,22 +38,22 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,190,182 -CAPTION "Acerca del Administrador de dispositivos" +CAPTION "Acerca del Gestor de Dispositivos" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Administrador de dispositivos v0.1\nCopyright (C) 2006\ncreado por Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Gestor de Dispositivos v0.1\nCopyright (C) 2006\nby Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 26 PUSHBUTTON "Cerrar", IDOK, 75, 162, 44, 15 ICON IDI_MAIN_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "Este programa es software libre; puedes redistribuirlo y/o modificarlo bajo los términos de la GNU General Public License tal y como fueron publicados por la Free Software Foundation; ya sea la versión 2 de la Licencia, o (bajo tu discreción) cualquier versión posterior.\r\n\r\nEste programa se distribuye con el fin de ser útil, pero viene SIN NINGUNA GARANTÍA; sin tan siquiera la garantía implícita de COMERCIALIZACIÓN o la de IDONEIDAD PARA UN PROPÓSITO CONCRETO. Para más información lee la GNU General Public License.\r\n\r\nDeberías de haber recibido una copia de la GNU General Public License con el programa; si no, puedes escribir a la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 EE.UU." + IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Propiedades" IDS_TOOLTIP_REFRESH "Actualizar" @@ -62,7 +62,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Gestor de Dispositivos de ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc index 1e59b0e42cb..25fe2fd2738 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publie par la Free Software Foundation; dans sa version 2 (ou selon votre prfrence) toute version ultrieure.\r\n\r\nCe programme est distribu dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE ; sans mme une garantie implicite de COMMERCIABILIT ou DE CONFORMIT UNE UTILISATION PARTICULIRE. \r\n\r\nVoir la Licence Publique Gnrale GNU pour plus de dtails. Vous devriez avoir reu un exemplaire de la Licence Publique Gnrale GNU avec ce programme ; si ce n'est pas le cas, crivez la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Proprits" IDS_TOOLTIP_REFRESH "Actualiser" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Gestionnaire de priphriques ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/he-IL.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/he-IL.rc index 780fb913935..a3b86066b8e 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/he-IL.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/he-IL.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "מאפיינים" IDS_TOOLTIP_REFRESH "רענן" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "מנהל ההתקנים של ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/id-ID.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/id-ID.rc index 97ee99f558c..a170a4a4886 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/id-ID.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/id-ID.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Program ini adalah software bebas; anda dapat mendistribusikan dan/atau mengubahnya di bawah term GNU General Public License seperti dipublikasikan oleh Free Software Foundation; baik Lisensi versi 2, atau (menurut opini anda) setiap versi berikutnya.\r\n\r\nProgram ini didistribusikan dengan harapan ia akan berguna, tetapi TANPA JAMINAN APAPUN; bahkan tanpa jaminan berarti dari MERCANTABILITAS atau KECUKUPAN UNTUK KEPERLUAN TERTENTU. Lihat GNU General Public License untuk lebih jelasnya.\r\n\r\nAnda seharusnya menerima duplikat GNU General Public License bersamaan dengan program ini; jika tidak, tulis ke Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Properti" IDS_TOOLTIP_REFRESH "Segarkan" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Manajer Device ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/it-IT.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/it-IT.rc index 92a954b4102..47975e427ca 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/it-IT.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/it-IT.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Questo programma software libero; puoi distribuirlo e/o modificarlo nei termini di licenza di 'GNU General Public License' come pubblicata dalla 'Free Software Foundation'; entrambe le versioni 2 della Licenza, o (a vostra scelta) qualunque versione successiva.\r\n\r\nQuesto programma distribuito con l'augurio che sia utile, ma PRIVO DI OGNI GARANZIA; privo anche della garanzia implicita di COMMERCIABILIT o UTILIZZABILIT PER UNO SPECIFICO USO. Vedi la 'GNU General Public License' per ulteriori dettagli.\r\n\r\nVoi dovreste aver ricevuto una copia della 'GNU General Public License' assieme a questo programma; se non cosi' scrivete a 'Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Propriet" IDS_TOOLTIP_REFRESH "Aggiorna" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "ReactOS: Gestione Dispositivi" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc index 5214169a44b..11db0d1785b 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "vpeB" IDS_TOOLTIP_REFRESH "XV" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "ReactOS foCX }l[W" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc index b75ee5ebae5..08516f30660 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc @@ -47,12 +47,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Ӽ" IDS_TOOLTIP_REFRESH " ħ" @@ -61,7 +61,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "ReactOS ġ " IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/no-NO.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/no-NO.rc index 27a43d071d3..fdd86474e81 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/no-NO.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/no-NO.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i hp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORML. Se p GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Egenskaper" IDS_TOOLTIP_REFRESH "Oppdater" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "ReactOS Enhetsbehandler" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc index 181ea8150cd..0b3ab9c383b 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Właściwości" IDS_TOOLTIP_REFRESH "Odśwież" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Menedżer urządzeń ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc index d2104effc4b..fdd44cc6036 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc @@ -46,12 +46,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Propriedades" IDS_TOOLTIP_REFRESH "Atualizar" @@ -60,7 +60,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Gerenciador de Dispositivos ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc index 3f59aed1498..e8b72a2e5db 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc @@ -45,12 +45,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 47, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Această aplicație este publică; fiind permisă modificarea și/sau (re)distribuția sa în termenii Licenței Publice Generale GNU publicată de Free Software Foundation; sau versiunea 2 a Licenței, sau (la alegere) a oricărei versiuni ulterioare.\r\n\r\nAceastă aplicație este distribuită doar în speranța de a fi utilă, FĂRĂ însă NICI O GARANȚIE; nici măcar cu garanția implicită a VANDABILITĂȚII sau a UTILITĂȚII ÎNTR-UN SCOP ANUME. Pentru mai multe detalii consultați Licența Publică Generală GNU.\r\n\r\nPuteți vedea această licență aici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDe asemenea puteți consulta traduceri neoficiale ale acestei licențe aici:\r\nhttp://www.gnu.org/licenses/translations.html" END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Proprietăți" IDS_TOOLTIP_REFRESH "Împrospătare" @@ -59,7 +59,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Gestionar de dispozitive ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc index 0337bed0702..b2c2675a394 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc @@ -12,18 +12,18 @@ BEGIN BEGIN MENUITEM "Печать", IDC_PRINT, GRAYED MENUITEM SEPARATOR - MENUITEM "Свойства", IDC_PROP, GRAYED + MENUITEM "Свойства", IDC_PROP, GRAYED END POPUP "Вид" BEGIN - MENUITEM "Устройства по типу", IDC_DEVBYTYPE, CHECKED - MENUITEM "Устройства по подключению",IDC_STATIC, GRAYED - MENUITEM "Ресурсы по типу", IDC_STATIC, GRAYED - MENUITEM "Ресурсы по подключению", IDC_STATIC, GRAYED + MENUITEM "Устройства по типу", IDC_DEVBYTYPE, CHECKED + MENUITEM "Устройства по подключению", IDC_STATIC, GRAYED + MENUITEM "Ресурсы по типу", IDC_STATIC, GRAYED + MENUITEM "Ресурсы по подключению", IDC_STATIC, GRAYED END POPUP "Справка" BEGIN - MENUITEM "О программе", IDC_ABOUT + MENUITEM "О программе", IDC_ABOUT END END @@ -31,7 +31,7 @@ IDR_POPUP MENU BEGIN POPUP "popup" BEGIN - MENUITEM "Свойства", IDC_PROP, GRAYED + MENUITEM "Свойства", IDC_PROP, GRAYED END END @@ -46,12 +46,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Эта программа является свободно распространяемой; Вы можете распространять ее повторно и (или) изменять, соблюдая условия Открытого лицензионного соглашения GNU, опубликованного Фондом свободно распространяемого программного обеспечения; либо редакции 2 Соглашения, либо (на ваше усмотрение) любой редакции, выпущенной позже.\r\n\r\nЭта программа распространяется в надежде на то, что она окажется полезной, но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, включая подразумеваемую гарантию КАЧЕСТВА либо ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробности содержатся в Открытом лицензионном соглашении GNU.\r\n\r\nВместе с этой программой должен распространяться экземпляр Открытого лицензионного соглашения GNU, если он отсутствует, сообщите об этом в Фонд свободно распространяемого программного обеспечения (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Свойства" IDS_TOOLTIP_REFRESH "Обновить" @@ -60,7 +60,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Диспетчер устройств ReactOS" IDS_HINT_BLANK " " @@ -68,9 +68,9 @@ BEGIN IDS_HINT_REFRESH " Обновить список." IDS_HINT_PROP " Открыть свойства для выбранного элемента." IDS_HINT_HELP " Показать окно справки." - IDS_HINT_ABOUT " О Диспетчере устройств ReactOS ." + IDS_HINT_ABOUT " О ReactOS Device Manager." - IDS_HINT_SYS_RESTORE " Восстановить нормальный размер этого окна." + IDS_HINT_SYS_RESTORE " Востановить нормальный размер этого окна." IDS_HINT_SYS_MOVE " Переместить это окно." IDS_HINT_SYS_SIZE " Изменить размер этого окна." IDS_HINT_SYS_MINIMIZE " Свернуть это окно в значок." diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc index 1c39347a191..0278c685059 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc @@ -49,12 +49,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Tento program je von softvr; mete ho ri a/alebo modifikova poda podmienok GNU Veobecnej verejnej licencie (GNU General Public License) ako bola zverejnen nadciou Free Software Foundation; bu verzie 2 tejto licencie, alebo (poda Vho uvenia) niektorej neskorej verzie.\r\n\r\nTento program je distribuovan v ndeji, e bude uiton, avak BEZ AKEJKOVEK ZRUKY; rovnako bez zruky PREDAJNOSTI alebo VHODNOSTI PRE URIT EL. Pre viac detailov si pozrite GNU Veobecn verejn licenciu (GNU General Public License).\r\n\r\nKpiu Veobecnej verejnej licencie GNU ste mali dosta spolu s tmto programom; ak nie, napte si o u na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Vlastnosti" IDS_TOOLTIP_REFRESH "Obnovi" @@ -63,7 +63,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Sprvca zariaden systmu ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc index dc1dd9f66ef..5ef7b455f81 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc @@ -50,12 +50,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Detta programmet r fri programvara; du kan distribuera det och/eller ndra det under villkoren enligt GNU General Public License som r utgivet av Free Software Foundation; version 2, eller (om du s nskar) alla senare versioner.\r\n\r\nDette programmet er utgivet i hopp om att det skall kunne anvndas, men DET FINNS INGA GARANTIER; ven utan underfrstdd garanti om SLJBARHET eller LMPLIGHET FR ETT VISST NDAML. Se p GNU General Public Licensen fr mer detaljer.\r\n\r\nDu skall ha motagit en kopia av GNU General Public Licensen tillsammans med detta programmet; om du inte har ftt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Egenskaper" IDS_TOOLTIP_REFRESH "Uppdater" @@ -64,7 +64,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "ReactOS Enhetshanterare" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/th-TH.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/th-TH.rc index 6fcb2510457..95e50dc9b51 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/th-TH.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/th-TH.rc @@ -53,12 +53,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "سѵ" IDS_TOOLTIP_REFRESH "鹿" @@ -67,7 +67,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "èѴػóͧ ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc index 072db2ad9a8..727f317f225 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc @@ -1,4 +1,6 @@ -/* TRANSLATOR: 2013, 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT @@ -16,14 +18,14 @@ BEGIN END POPUP "&Görünüm" BEGIN - MENUITEM "&Türe Göre Aygıtlar", IDC_DEVBYTYPE, CHECKED - MENUITEM "&Bağlantıya Göre Aygıtlar", IDC_STATIC, GRAYED - MENUITEM "T&üre Göre Kaynaklar", IDC_STATIC, GRAYED - MENUITEM "B&ağlantıya Göre Kaynaklar", IDC_STATIC, GRAYED + MENUITEM "&Türe Göre Aygıtları Kümele", IDC_DEVBYTYPE, CHECKED + MENUITEM "&Bağlantıya Göre Aygıtları Kümele", IDC_STATIC, GRAYED + MENUITEM "T&üre Göre Kaynakları Kümele", IDC_STATIC, GRAYED + MENUITEM "B&ağlantıya Göre Kaynakları Kümele", IDC_STATIC, GRAYED END POPUP "&Yardım" BEGIN - MENUITEM "&Üzerine...", IDC_ABOUT + MENUITEM "&Hakkında", IDC_ABOUT END END @@ -36,22 +38,22 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,190,182 -CAPTION "Aygıt Yöneticisi Üzerine" +CAPTION "Aygıt Yöneticisi Hakkında" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Aygıt Yöneticisi - Sürüm: 0.1\nTelif Hakkı: 2006\nGed Murphy (gedmurphy@gmail.com) ile.", IDC_STATIC, 48, 7, 130, 30 - PUSHBUTTON "Tamam", IDOK, 75, 162, 44, 15 + LTEXT "Aygıt Yöneticisi - Sürüm: 0.1\nTelif Hakkı: 2006\nGed Murphy (gedmurphy@gmail.com) eliyle yazılmıştır.", IDC_STATIC, 48, 7, 130, 30 + PUSHBUTTON "Kapat", IDOK, 75, 162, 44, 15 ICON IDI_MAIN_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu izlence özgür yazılımdır; bunu, Özgür Yazılım Vakfı'nın yayımladığı GNU Umûmî Kamu Ruhsatı'nın, 2. sürümünün ya da daha sonraki bir sürümünün (Orası size bağlı.) koşulları altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu izlence, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bu izlencenin HİÇBİR GÜVENCESİ YOKTUR, SATILABİLİRLİĞİN ve BELİRLİ BİR AMACA UYGUNLUĞUN demek istenilen güvencesi bile. Daha çok bilgi için GNU Umûmî Kamu Ruhsatı'na bakınız.\r\n\r\nBu izlenceyle birlikte GNU Umûmî Kamu Ruhsatı'nın bir kopyasını almış olmalısınız, eğer yoksa Özgür Yazılım Vakfı AŞ'ye (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılımı Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Ruhsatı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın HİÇBİR GÜVENCESİ YOKTUR. Daha çok bilgi için GNU Umûmî Kamu Ruhsatı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Ruhsatı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Husûsiyetler" IDS_TOOLTIP_REFRESH "Yenile" @@ -60,19 +62,20 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Aygıt Yöneticisi" IDS_HINT_BLANK " " - IDS_HINT_EXIT " İzlenceden çıkar." + IDS_HINT_EXIT " Yazılımdan çıkar." IDS_HINT_REFRESH " Hizmet dizelgesini yeniler." - IDS_HINT_PROP " Seçilen için husûsiyetler penceresini açar." - IDS_HINT_HELP " Yardım penceresini açar." - IDS_HINT_ABOUT " Aygıt Yöneticisi üzerine." - IDS_HINT_SYS_RESTORE " Bu pencereyi eski boyutlarına döndürür." - IDS_HINT_SYS_MOVE " Bu pencereyi devindirir." - IDS_HINT_SYS_SIZE " Bu pencerenin boyutlarını değiştirir." - IDS_HINT_SYS_MINIMIZE " Bu pencereyi simge durumuna küçültür." - IDS_HINT_SYS_MAXIMIZE " Bu pencereyi, bu görüntülüğü kaplatana dek genişletir." - IDS_HINT_SYS_CLOSE " Bu pencereyi kapatır." + IDS_HINT_PROP " Seçilen öğenin husûsiyetlerini gösterir." + IDS_HINT_HELP " Yardım konularını açar." + IDS_HINT_ABOUT " Aygıt Yöneticisi hakkında bilgi görüntüler." + + IDS_HINT_SYS_RESTORE " Pencerenin boyutlarını, eski durumuna döndürür." + IDS_HINT_SYS_MOVE " Pencerenin konumunu değiştirir." + IDS_HINT_SYS_SIZE " Pencerenin boyutlarını değiştirir." + IDS_HINT_SYS_MINIMIZE " Pencereyi, simge durumuna küçültür." + IDS_HINT_SYS_MAXIMIZE " Pencereyle görüntülüğü kaplatır." + IDS_HINT_SYS_CLOSE " Pencereyi kapatır." END diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc index 7f6297a1ed7..1aae4afdf3e 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc @@ -52,12 +52,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "Властивості" IDS_TOOLTIP_REFRESH "Оновити" @@ -66,7 +66,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Диспетчер пристроїв ReactOS" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc b/reactos/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc index 77c49239e79..b550a811473 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc @@ -48,12 +48,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "这个程序是自由软件;你可以在自由软件基金会(FSF)的 GNU LGPL 协议下重新发布或修改它;也适用于这个协议的版本 2,或(在您看来)任何更新的版本。\r\n\r\n这个程序在希望其有用的愿望中发布,但没有任何保证;也不意味着性能保证或对某特定用途的适用性。请查看 GNU GPL 许可协议以了解更多细节。\r\n\r\n您应该已经收到了一份和这个程序一起的 GNU GPL 协议的副本;如果没有,请写信给自由软件基金会(FSF):51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_TOOLTIP_PROP "属性" IDS_TOOLTIP_REFRESH "刷新" @@ -62,7 +62,7 @@ BEGIN END /* Hints */ -STRINGTABLE +STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "ReactOS 设备管理器" IDS_HINT_BLANK " " diff --git a/reactos/base/applications/mscutils/devmgmt_new/rsrc.rc b/reactos/base/applications/mscutils/devmgmt_new/rsrc.rc index 597f88748ba..d6048236411 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/rsrc.rc +++ b/reactos/base/applications/mscutils/devmgmt_new/rsrc.rc @@ -7,10 +7,12 @@ IDI_MAIN_ICON ICON "res/computer.ico" IDB_ROOT_IMAGE BITMAP "res/root.bmp" /* main toolbar icons */ -IDB_PROP BITMAP "res/properties.bmp" -IDB_REFRESH BITMAP "res/refresh.bmp" -IDB_HELP BITMAP "res/help.bmp" -IDB_EXIT BITMAP "res/exit.bmp" +IDB_PROP BITMAP DISCARDABLE "res/properties.bmp" +IDB_REFRESH BITMAP DISCARDABLE "res/refresh.bmp" +IDB_HELP BITMAP DISCARDABLE "res/help.bmp" +IDB_EXIT BITMAP DISCARDABLE "res/exit.bmp" + +//#include "lang/en-US.rc" #ifdef LANGUAGE_BG_BG #include "lang/bg-BG.rc" @@ -76,9 +78,6 @@ IDB_EXIT BITMAP "res/exit.bmp" #ifdef LANGUAGE_TR_TR #include "lang/tr-TR.rc" #endif -#ifdef LANGUAGE_SQ_AL - #include "lang/sq-AL.rc" -#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/reactos/base/applications/mscutils/devmgmt_new/stdafx.h b/reactos/base/applications/mscutils/devmgmt_new/stdafx.h index c8036cf787e..fdbebc24fd9 100644 --- a/reactos/base/applications/mscutils/devmgmt_new/stdafx.h +++ b/reactos/base/applications/mscutils/devmgmt_new/stdafx.h @@ -6,6 +6,8 @@ #include #include #include +#include +#include #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit diff --git a/reactos/base/applications/mscutils/devmgmt_new/targetver.h b/reactos/base/applications/mscutils/devmgmt_new/targetver.h new file mode 100644 index 00000000000..87c0086de75 --- /dev/null +++ b/reactos/base/applications/mscutils/devmgmt_new/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include