Author: gedmurphy
Date: Mon Oct 12 19:18:47 2015
New Revision: 69517
URL:
http://svn.reactos.org/svn/reactos?rev=69517&view=rev
Log:
[DEVMGR]
A few g++ fixes
Modified:
trunk/reactos/dll/win32/devmgr_new/devmgmt/ClassNode.cpp
trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceNode.cpp
trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceNode.h
trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceView.cpp
trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceView.h
trunk/reactos/dll/win32/devmgr_new/devmgmt/MainWindow.cpp
trunk/reactos/dll/win32/devmgr_new/devmgmt/Node.cpp
trunk/reactos/dll/win32/devmgr_new/devmgmt/Node.h
trunk/reactos/dll/win32/devmgr_new/devmgmt/RootNode.cpp
Modified: trunk/reactos/dll/win32/devmgr_new/devmgmt/ClassNode.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr_new/devmg…
==============================================================================
--- trunk/reactos/dll/win32/devmgr_new/devmgmt/ClassNode.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr_new/devmgmt/ClassNode.cpp [iso-8859-1] Mon Oct 12
19:18:47 2015
@@ -1,7 +1,7 @@
/*
* PROJECT: ReactOS Device Manager
* LICENSE: GPL - See COPYING in the top level directory
-* FILE: dll/win32/devmgr/devmgr/ClassNode.cpp
+* FILE: dll/win32/devmgr/devmgmt/ClassNode.cpp
* PURPOSE: Class object for
* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org>
*
Modified: trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceNode.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr_new/devmg…
==============================================================================
--- trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceNode.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceNode.cpp [iso-8859-1] Mon Oct 12
19:18:47 2015
@@ -1,7 +1,7 @@
/*
* PROJECT: ReactOS Device Manager
* LICENSE: GPL - See COPYING in the top level directory
-* FILE: dll/win32/devmgr/devmgr/ClassNode.cpp
+* FILE: dll/win32/devmgr/devmgmt/ClassNode.cpp
* PURPOSE: Class object for
* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org>
*
Modified: trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceNode.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr_new/devmg…
==============================================================================
--- trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceNode.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceNode.h [iso-8859-1] Mon Oct 12
19:18:47 2015
@@ -5,8 +5,9 @@
{
private:
SP_DEVINFO_DATA m_DevinfoData;
+ DEVINST m_DevInst;
HDEVINFO m_hDevInfo;
- DEVINST m_DevInst;
+
ULONG m_Status;
ULONG m_ProblemNumber;
int m_OverlayImage;
Modified: trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr_new/devmg…
==============================================================================
--- trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceView.cpp [iso-8859-1] Mon Oct 12
19:18:47 2015
@@ -1,7 +1,7 @@
/*
* PROJECT: ReactOS Device Manager
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: dll/win32/devmgr/devmgr/DeviceView.cpp
+ * FILE: dll/win32/devmgr/devmgmt/DeviceView.cpp
* PURPOSE: Implements the tree view which contains the devices
* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org>
*/
@@ -51,7 +51,7 @@
m_hPropertyDialog(NULL),
m_hMenu(NULL),
m_ViewType(DevicesByType),
- m_ShowHidden(FALSE),
+ m_ShowHidden(false),
m_RootNode(NULL)
{
ZeroMemory(&m_ImageListData, sizeof(SP_CLASSIMAGELIST_DATA));
Modified: trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceView.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr_new/devmg…
==============================================================================
--- trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceView.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr_new/devmgmt/DeviceView.h [iso-8859-1] Mon Oct 12
19:18:47 2015
@@ -14,10 +14,7 @@
class CDeviceView
{
- CRootNode *m_RootNode;
- CAtlList<CClassNode *> m_ClassNodeList;
- CAtlList<CDeviceNode *> m_DeviceNodeList;
- SP_CLASSIMAGELIST_DATA m_ImageListData;
+
HWND m_hMainWnd;
HWND m_hTreeView;
HWND m_hPropertyDialog;
@@ -25,6 +22,11 @@
ViewType m_ViewType;
HTREEITEM m_hTreeRoot;
bool m_ShowHidden;
+
+ CRootNode *m_RootNode;
+ CAtlList<CClassNode *> m_ClassNodeList;
+ CAtlList<CDeviceNode *> m_DeviceNodeList;
+ SP_CLASSIMAGELIST_DATA m_ImageListData;
public:
CDeviceView(
Modified: trunk/reactos/dll/win32/devmgr_new/devmgmt/MainWindow.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr_new/devmg…
==============================================================================
--- trunk/reactos/dll/win32/devmgr_new/devmgmt/MainWindow.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr_new/devmgmt/MainWindow.cpp [iso-8859-1] Mon Oct 12
19:18:47 2015
@@ -1,7 +1,7 @@
/*
* PROJECT: ReactOS Device Manager
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: dll/win32/devmgr/devmgr/MainWindow.cpp
+ * FILE: dll/win32/devmgr/devmgmt/MainWindow.cpp
* PURPOSE: Implements the main container window for the device view
* COPYRIGHT: Copyright 2014 - 2015 Ged Murphy <gedmurphy(a)reactos.org>
*/
@@ -60,18 +60,18 @@
{SC_SIZE, IDS_HINT_SYS_SIZE},
{SC_MINIMIZE, IDS_HINT_SYS_MINIMIZE},
{SC_MAXIMIZE, IDS_HINT_SYS_MAXIMIZE},
- {SC_CLOSE, IDS_HINT_SYS_CLOSE},
+ {SC_CLOSE, IDS_HINT_SYS_CLOSE}
};
static TBBUTTON TbButtons[] =
{
- { BTN_PROPERTIES, IDC_PROPERTIES, TBSTATE_ENABLED, BTNS_BUTTON, 0, 0 },
- { BTN_SCAN_HARDWARE, IDC_SCAN_HARDWARE, TBSTATE_ENABLED, BTNS_BUTTON, 0, 0 },
- { 2, IDC_STATIC, TBSTATE_ENABLED, BTNS_SEP, 0, 0 },
- { BTN_ENABLE_DRV, IDC_ENABLE_DRV, TBSTATE_ENABLED, BTNS_BUTTON, 0, 0 },
- { BTN_DISABLE_DRV, IDC_DISABLE_DRV, TBSTATE_ENABLED, BTNS_BUTTON, 0, 0 },
- { BTN_UPDATE_DRV, IDC_UPDATE_DRV, TBSTATE_ENABLED, BTNS_BUTTON, 0, 0 },
- { BTN_UNINSTALL_DRV, IDC_UNINSTALL_DRV, TBSTATE_ENABLED, BTNS_BUTTON, 0, 0 }
+ { BTN_PROPERTIES, IDC_PROPERTIES, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },
+ { BTN_SCAN_HARDWARE, IDC_SCAN_HARDWARE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },
+ { 2, IDC_STATIC, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0 },
+ { BTN_ENABLE_DRV, IDC_ENABLE_DRV, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },
+ { BTN_DISABLE_DRV, IDC_DISABLE_DRV, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },
+ { BTN_UPDATE_DRV, IDC_UPDATE_DRV, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },
+ { BTN_UNINSTALL_DRV, IDC_UNINSTALL_DRV, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }
};
@@ -245,7 +245,6 @@
CDeviceManager::RefreshView(_In_ ViewType Type)
{
UINT CheckId = 0;
- BOOL bSuccess;
// Refreshed the cached view
m_DeviceView->Refresh(Type, FALSE, TRUE, NULL);
@@ -261,20 +260,19 @@
}
// Set the new check item
- bSuccess = CheckMenuRadioItem(m_hMenu,
- IDC_DEVBYTYPE,
- IDC_RESBYCONN,
- CheckId,
- MF_BYCOMMAND);
-
- return TRUE;
+ CheckMenuRadioItem(m_hMenu,
+ IDC_DEVBYTYPE,
+ IDC_RESBYCONN,
+ CheckId,
+ MF_BYCOMMAND);
+
+ return true;
}
bool
CDeviceManager::CreateToolBar(void)
{
TBADDBITMAP TbAddBitmap;
- INT Index;
DWORD dwStyles = WS_CHILDWINDOW | TBSTYLE_FLAT | TBSTYLE_WRAPABLE | TBSTYLE_TOOLTIPS
| CCS_NODIVIDER;
DWORD dwExStyles = WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR;
@@ -307,7 +305,7 @@
TbAddBitmap.hInst = g_hThisInstance;
TbAddBitmap.nID = IDB_TOOLBAR;
- Index = SendMessageW(m_hToolBar, TB_ADDBITMAP, _countof(TbButtons),
(LPARAM)&TbAddBitmap);
+ SendMessageW(m_hToolBar, TB_ADDBITMAP, _countof(TbButtons),
(LPARAM)&TbAddBitmap);
SendMessageW(m_hToolBar, TB_ADDBUTTONSW, _countof(TbButtons), (LPARAM)TbButtons);
SendMessageW(m_hToolBar, TB_AUTOSIZE, 0, 0);
@@ -496,7 +494,7 @@
CDeviceManager::OnNotify(_In_ LPARAM lParam)
{
LPNMHDR NmHdr = (LPNMHDR)lParam;
- LRESULT Ret;
+ LRESULT Ret = 0;
switch (NmHdr->code)
{
@@ -556,7 +554,7 @@
}
}
- return 0;
+ return Ret;
}
LRESULT
Modified: trunk/reactos/dll/win32/devmgr_new/devmgmt/Node.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr_new/devmg…
==============================================================================
--- trunk/reactos/dll/win32/devmgr_new/devmgmt/Node.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr_new/devmgmt/Node.cpp [iso-8859-1] Mon Oct 12 19:18:47
2015
@@ -1,7 +1,7 @@
/*
* PROJECT: ReactOS Device Manager
* LICENSE: GPL - See COPYING in the top level directory
-* FILE: dll/win32/devmgr/devmgr/node.cpp
+* FILE: dll/win32/devmgr/devmgmt/node.cpp
* PURPOSE: Abstract base object for each node in the tree
* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org>
*
Modified: trunk/reactos/dll/win32/devmgr_new/devmgmt/Node.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr_new/devmg…
==============================================================================
--- trunk/reactos/dll/win32/devmgr_new/devmgmt/Node.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr_new/devmgmt/Node.h [iso-8859-1] Mon Oct 12 19:18:47
2015
@@ -12,12 +12,12 @@
class CNode
{
protected:
+ NodeType m_NodeType;
PSP_CLASSIMAGELIST_DATA m_ImageListData;
LPWSTR m_DeviceId;
WCHAR m_DisplayName[DISPLAY_NAME_LEN];
GUID m_ClassGuid;
INT m_ClassImage;
- NodeType m_NodeType;
public:
CNode(
@@ -25,7 +25,7 @@
_In_ PSP_CLASSIMAGELIST_DATA ImageListData
);
- ~CNode();
+ virtual ~CNode();
virtual bool SetupNode() = 0;
Modified: trunk/reactos/dll/win32/devmgr_new/devmgmt/RootNode.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr_new/devmg…
==============================================================================
--- trunk/reactos/dll/win32/devmgr_new/devmgmt/RootNode.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr_new/devmgmt/RootNode.cpp [iso-8859-1] Mon Oct 12
19:18:47 2015
@@ -1,7 +1,7 @@
/*
* PROJECT: ReactOS Device Manager
* LICENSE: GPL - See COPYING in the top level directory
-* FILE: dll/win32/devmgr/devmgr/RootNode.cpp
+* FILE: dll/win32/devmgr/devmgmt/RootNode.cpp
* PURPOSE: Root object for
* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org>
*