fix regedit to compile with MSVC
authorChristoph von Wittich <christoph_vw@reactos.org>
Mon, 17 Oct 2005 11:10:11 +0000 (11:10 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Mon, 17 Oct 2005 11:10:11 +0000 (11:10 +0000)
svn path=/trunk/; revision=18510

reactos/subsys/system/regedit/framewnd.c
reactos/subsys/system/regedit/regproc.c
reactos/subsys/system/regedit/treeview.c

index 8860595..0aec560 100644 (file)
@@ -28,6 +28,7 @@
 #include <shellapi.h>
 #include <objsel.h>
 #include <objbase.h>
+#include <ole2.h>
 
 #include "main.h"
 #include "regproc.h"
index 8d1b0de..17ab9ff 100644 (file)
@@ -23,6 +23,7 @@
 #include <limits.h>
 #include <stdio.h>
 #include <ctype.h>
+#include <stdlib.h>
 #include <windows.h>
 #include <winnt.h>
 #include <winreg.h>
index 6c9455b..8f7544f 100644 (file)
@@ -124,7 +124,11 @@ static HTREEITEM AddEntryToTree(HWND hwndTV, HTREEITEM hParent, LPTSTR label, HK
     tvi.iSelectedImage = Image_Open;
     tvi.cChildren = dwChildren;
     tvi.lParam = (LPARAM)hKey;
+#if defined(__MINGW32__)
     tvins.u.item = tvi;
+#else
+       tvins.item = tvi;
+#endif
     tvins.hInsertAfter = (HTREEITEM)(hKey ? TVI_LAST : TVI_FIRST);
     tvins.hParent = hParent;
     return TreeView_InsertItem(hwndTV, &tvins);
@@ -362,7 +366,11 @@ static BOOL InitTreeViewItems(HWND hwndTV, LPTSTR pHostName)
     tvi.cChildren = 5;
     /* Save the heading level in the item's application-defined data area.  */
     tvi.lParam = (LPARAM)NULL;
-    tvins.u.item = tvi;
+#if defined(__MINGW32__)
+               tvins.u.item = tvi;
+#else
+               tvins.item = tvi;
+#endif
     tvins.hInsertAfter = (HTREEITEM)TVI_FIRST;
     tvins.hParent = TVI_ROOT;
     /* Add the item to the tree view control.  */