dlls/shell32 drive icons

Ge van Geldorp gvg at reactos.com
Tue Sep 21 17:18:18 CDT 2004


Changelog:
  Klemens Friedl <frik85 at hotmail.com>
  - drive icon artwork
  Martin Fuchs <martin-fuchs at gmx.net>
  - display different drive icons depending on the drive type

Index: dlls/shell32/iconcache.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/iconcache.c,v
retrieving revision 1.80
diff -u -r1.80 iconcache.c
--- dlls/shell32/iconcache.c	1 Sep 2004 17:36:04 -0000	1.80
+++ dlls/shell32/iconcache.c	21 Sep 2004 20:58:03 -0000
@@ -208,6 +208,13 @@
 {
 	HICON		hSm, hLg;
 	UINT		index;
+	int		cx_small, cy_small;
+	int		cx_large, cy_large;
+
+	cx_small = GetSystemMetrics(SM_CXSMICON);
+	cy_small = GetSystemMetrics(SM_CYSMICON);
+	cx_large = GetSystemMetrics(SM_CXICON);
+	cy_large = GetSystemMetrics(SM_CYICON);
 
 	TRACE("\n");
 
@@ -229,13 +236,13 @@
 
 	for (index=1; index<39; index++)
 	{
-	  hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, 16, 16,LR_SHARED);
-	  hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, 32, 32,LR_SHARED);
+	  hSm = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_small, cy_small, LR_SHARED);
+	  hLg = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_large, cy_large, LR_SHARED);
 
 	  if(!hSm)
 	  {
-	    hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(0), IMAGE_ICON, 16, 16,LR_SHARED);
-	    hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(0), IMAGE_ICON, 32, 32,LR_SHARED);
+	    hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_small, cy_small, LR_SHARED);
+	    hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_large, cy_large, LR_SHARED);
 	  }
          SIC_IconAppend (swShell32Name, index, hSm, hLg);
 	}
@@ -329,7 +336,7 @@
 	}
 
 	if (INVALID_INDEX == *pIndex)	/* default icon when failed */
-	  *pIndex = 1;
+	  *pIndex = 0;
 
 	return ret;
 
Index: dlls/shell32/shres.rc
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shres.rc,v
retrieving revision 1.33
diff -u -r1.33 shres.rc
--- dlls/shell32/shres.rc	12 Jul 2004 20:44:33 -0000	1.33
+++ dlls/shell32/shres.rc	21 Sep 2004 20:58:03 -0000
@@ -34,7 +34,7 @@
 END
 
 /* BINRES document.ico */
-0 ICON document.ico
+1 ICON document.ico
 /* {
  '00 00 01 00 04 00 10 10 10 00 01 00 04 00 28 01'
  '00 00 46 00 00 00 10 10 00 00 01 00 08 00 68 05'



More information about the wine-patches mailing list