move the hardware page dialog into it's own file
authorThomas Bluemel <thomas@reactsoft.com>
Fri, 25 Nov 2005 15:36:14 +0000 (15:36 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Fri, 25 Nov 2005 15:36:14 +0000 (15:36 +0000)
svn path=/trunk/; revision=19556

reactos/lib/devmgr/devmgr.xml
reactos/lib/devmgr/hwpage.c [moved from reactos/lib/devmgr/devmgr.c with 97% similarity]
reactos/lib/devmgr/misc.c

index a62ff03..83cc49d 100644 (file)
@@ -13,7 +13,7 @@
        <library>setupapi</library>
        <library>user32</library>
        <file>devmgr.rc</file>
-       <file>devmgr.c</file>
+       <file>hwpage.c</file>
        <file>misc.c</file>
        <file>stubs.c</file>
        <pch>precomp.h</pch>
similarity index 97%
rename from reactos/lib/devmgr/devmgr.c
rename to reactos/lib/devmgr/hwpage.c
index 1741b91..e98d51f 100644 (file)
@@ -19,7 +19,7 @@
 /* $Id$
  *
  * PROJECT:         ReactOS devmgr.dll
- * FILE:            lib/devmgr/devmgr.c
+ * FILE:            lib/devmgr/hwpage.c
  * PURPOSE:         ReactOS Device Manager
  * PROGRAMMER:      Thomas Weidenmueller <w3seek@reactos.com>
  * UPDATE HISTORY:
@@ -30,8 +30,6 @@
 #define NDEBUG
 #include <debug.h>
 
-HINSTANCE hDllInstance = NULL;
-
 typedef VOID (WINAPI *PINITCOMMONCONTROLS)(VOID);
 
 typedef enum
@@ -430,7 +428,7 @@ HardwareDlgResize(IN PHARDWARE_PAGE_DATA hpd,
         {
             return;
         }
-        y += rc.bottom - rc.top + ptMargin.y;
+        y += rc.bottom - rc.top + (ptMargin.y / 2);
 
         /* resize the IDC_LOCATION label */
         hControl = GetDlgItem(hpd->hWnd,
@@ -448,7 +446,7 @@ HardwareDlgResize(IN PHARDWARE_PAGE_DATA hpd,
         {
             return;
         }
-        y += rc.bottom - rc.top + ptMargin.y;
+        y += rc.bottom - rc.top + (ptMargin.y / 2);
 
         /* measure the size of the buttons */
         hButton = GetDlgItem(hpd->hWnd,
@@ -494,7 +492,7 @@ HardwareDlgResize(IN PHARDWARE_PAGE_DATA hpd,
                              IDC_TROUBLESHOOT);
         GetWindowRect(hButton,
                       &rcButton);
-        x -= ptMargin.x + (rcButton.right - rcButton.left);
+        x -= (ptMargin.x / 2) + (rcButton.right - rcButton.left);
         if (!(dwp = DeferWindowPos(dwp,
                                    hButton,
                                    NULL,
@@ -687,10 +685,6 @@ HardwareDlgProc(IN HWND hwndDlg,
  * REVISIONS
  *   13-05-2005 first working version (Sebastian Gasiorek <zebasoftis@gmail.com>)
  *
- * NOTE
- *   uUnknown seems to be some kind of flag how the entries should be displayed,
- *   in Win it seems to be always 0x00000001
- *
  * TODO
  *   missing: device icon in list view, Troubleshoot button, device properties,
  *            status description,
@@ -807,21 +801,3 @@ DeviceCreateHardwarePage(IN HWND hWndParent,
                                       1,
                                       HWPD_LARGELIST);
 }
-
-
-BOOL
-STDCALL
-DllMain(IN HINSTANCE hinstDLL,
-        IN DWORD dwReason,
-           IN LPVOID lpvReserved)
-{
-    switch (dwReason)
-    {
-        case DLL_PROCESS_ATTACH:
-            DisableThreadLibraryCalls(hinstDLL);
-            hDllInstance = hinstDLL;
-            break;
-    }
-
-    return TRUE;
-}
index e7bd266..66fcfa8 100644 (file)
@@ -27,6 +27,8 @@
  */
 #include <precomp.h>
 
+HINSTANCE hDllInstance = NULL;
+
 static INT
 LengthOfStrResource(IN HINSTANCE hInst,
                     IN UINT uID)
@@ -146,3 +148,20 @@ ListViewGetSelectedItemData(IN HWND hwnd)
 
     return 0;
 }
+
+BOOL
+STDCALL
+DllMain(IN HINSTANCE hinstDLL,
+        IN DWORD dwReason,
+           IN LPVOID lpvReserved)
+{
+    switch (dwReason)
+    {
+        case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinstDLL);
+            hDllInstance = hinstDLL;
+            break;
+    }
+
+    return TRUE;
+}