Implement SPI_GETICONMETRICS.

Change WARN -> FIXME for unimplemented SPI_s and set appropriate error.
oldstable
Huw D M Davies 2000-03-07 12:25:40 +00:00 committed by Alexandre Julliard
parent fddbcf3c8d
commit 4688c7ca1e
2 changed files with 51 additions and 2 deletions

View File

@ -2222,6 +2222,24 @@ typedef struct {
DECL_WINELIB_TYPE_AW(NONCLIENTMETRICS)
DECL_WINELIB_TYPE_AW(LPNONCLIENTMETRICS)
typedef struct tagICONMETRICSA {
UINT cbSize;
int iHorzSpacing;
int iVertSpacing;
int iTitleWrap;
LOGFONTA lfFont;
} ICONMETRICSA, *LPICONMETRICSA;
typedef struct tagICONMETRICSW {
UINT cbSize;
int iHorzSpacing;
int iVertSpacing;
int iTitleWrap;
LOGFONTW lfFont;
} ICONMETRICSW, *LPICONMETRICSW;
DECL_WINELIB_TYPE_AW(ICONMETRICS)
DECL_WINELIB_TYPE_AW(LPICONMETRICS)
/* Window Styles */
#define WS_OVERLAPPED 0x00000000L

View File

@ -45,6 +45,7 @@
#include "wingdi.h"
#include "wine/winuser16.h"
#include "tweak.h"
#include "winerror.h"
/**********************************************************************/
@ -946,6 +947,21 @@ BOOL WINAPI SystemParametersInfoA( UINT uAction, UINT uParam,
lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
break;
}
case SPI_GETICONMETRICS: {
LPICONMETRICSA lpIcon = lpvParam;
if(!lpIcon || lpIcon->cbSize != sizeof(*lpIcon))
return FALSE;
SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0,
&lpIcon->iHorzSpacing, FALSE );
SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0,
&lpIcon->iVertSpacing, FALSE );
SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0,
&lpIcon->iTitleWrap, FALSE );
SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
&lpIcon->lfFont, FALSE );
break;
}
case SPI_GETWORKAREA:
SetRect( (RECT *)lpvParam, 0, 0,
GetSystemMetrics( SM_CXSCREEN ),
@ -1234,8 +1250,9 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
break;
default:
WARN_(system)("Unknown option %d.\n", uAction);
break;
FIXME_(system)("Unknown option %d.\n", uAction);
SetLastError(ERROR_INVALID_SPI_VALUE);
return 0;
}
return 1;
}
@ -1291,6 +1308,20 @@ BOOL WINAPI SystemParametersInfoW( UINT uAction, UINT uParam,
lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
}
break;
case SPI_GETICONMETRICS: {
LPICONMETRICSW lpIcon = lpvParam;
if(!lpIcon || lpIcon->cbSize != sizeof(*lpIcon))
return FALSE;
SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0,
&lpIcon->iHorzSpacing, FALSE );
SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0,
&lpIcon->iVertSpacing, FALSE );
SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0,
&lpIcon->iTitleWrap, FALSE );
SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
&lpIcon->lfFont, FALSE );
break;
}
case SPI_GETNONCLIENTMETRICS: {
/* FIXME: implement correctly */
LPNONCLIENTMETRICSW lpnm=(LPNONCLIENTMETRICSW)lpvParam;