Commit e052744e authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed the size of the file dialog icons.

parent 09d42ff2
...@@ -61,8 +61,8 @@ static HICON16 hFloppy = 0; ...@@ -61,8 +61,8 @@ static HICON16 hFloppy = 0;
static HICON16 hHDisk = 0; static HICON16 hHDisk = 0;
static HICON16 hCDRom = 0; static HICON16 hCDRom = 0;
static HICON16 hNet = 0; static HICON16 hNet = 0;
static int fldrHeight = 0; static const int fldrHeight = 16;
static int fldrWidth = 0; static const int fldrWidth = 20;
#define OFN_PROP "FILEDLG_OFN" #define OFN_PROP "FILEDLG_OFN"
...@@ -90,8 +90,7 @@ static LRESULT WINAPI FileOpenDlgProc(HWND hDlg, UINT msg, ...@@ -90,8 +90,7 @@ static LRESULT WINAPI FileOpenDlgProc(HWND hDlg, UINT msg,
static BOOL FileDlg_Init(void) static BOOL FileDlg_Init(void)
{ {
static BOOL initialized = 0; static BOOL initialized = 0;
CURSORICONINFO *fldrInfo;
if (!initialized) { if (!initialized) {
HINSTANCE inst = GetModuleHandleA( "comdlg32.dll" ); HINSTANCE inst = GetModuleHandleA( "comdlg32.dll" );
if (!inst) if (!inst)
...@@ -99,27 +98,18 @@ static BOOL FileDlg_Init(void) ...@@ -99,27 +98,18 @@ static BOOL FileDlg_Init(void)
ERR( "cannot get comdlg32.dll instance\n" ); ERR( "cannot get comdlg32.dll instance\n" );
return FALSE; return FALSE;
} }
if (!hFolder) hFolder = LoadIconA( inst, "FOLDER" ); hFolder = LoadImageA( inst, "FOLDER", IMAGE_ICON, 16, 16, LR_SHARED );
if (!hFolder2) hFolder2 = LoadIconA( inst, "FOLDER2" ); hFolder2 = LoadImageA( inst, "FOLDER2", IMAGE_ICON, 16, 16, LR_SHARED );
if (!hFloppy) hFloppy = LoadIconA( inst, "FLOPPY" ); hFloppy = LoadImageA( inst, "FLOPPY", IMAGE_ICON, 16, 16, LR_SHARED );
if (!hHDisk) hHDisk = LoadIconA( inst, "HDISK" ); hHDisk = LoadImageA( inst, "HDISK", IMAGE_ICON, 16, 16, LR_SHARED );
if (!hCDRom) hCDRom = LoadIconA( inst, "CDROM" ); hCDRom = LoadImageA( inst, "CDROM", IMAGE_ICON, 16, 16, LR_SHARED );
if (!hNet) hNet = LoadIconA( inst, "NETWORK" ); hNet = LoadImageA( inst, "NETWORK", IMAGE_ICON, 16, 16, LR_SHARED );
if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 || if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 ||
hHDisk == 0 || hCDRom == 0 || hNet == 0) hHDisk == 0 || hCDRom == 0 || hNet == 0)
{ {
ERR("Error loading icons !\n"); ERR("Error loading icons !\n");
return FALSE; return FALSE;
} }
fldrInfo = (CURSORICONINFO *) GlobalLock16( hFolder2 );
if (!fldrInfo)
{
ERR("Error measuring icons !\n");
return FALSE;
}
fldrHeight = fldrInfo -> nHeight;
fldrWidth = fldrInfo -> nWidth;
GlobalUnlock16( hFolder2 );
initialized = TRUE; initialized = TRUE;
} }
return TRUE; return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment