mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
- implement SPI_GETMINIMIZEDMETRICS and SPI_SETMINIMIZEDMETRICS in IntSystemParametersInfo and UserSystemParametersInfo
- add both to SystemParametersInfoA See issue #1668 for more details. svn path=/trunk/; revision=25361
This commit is contained in:
@@ -107,6 +107,8 @@ SystemParametersInfoA(UINT uiAction,
|
||||
case SPI_GETGRADIENTCAPTIONS:
|
||||
case SPI_GETFOCUSBORDERHEIGHT:
|
||||
case SPI_GETFOCUSBORDERWIDTH:
|
||||
case SPI_GETMINIMIZEDMETRICS:
|
||||
case SPI_SETMINIMIZEDMETRICS:
|
||||
{
|
||||
return NtUserSystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
|
||||
}
|
||||
|
||||
@@ -913,6 +913,7 @@ IntSystemParametersInfo(
|
||||
static BOOL bInitialized = FALSE;
|
||||
static LOGFONTW IconFont;
|
||||
static NONCLIENTMETRICSW pMetrics;
|
||||
static MINIMIZEDMETRICS MinimizedMetrics;
|
||||
static BOOL GradientCaptions = TRUE;
|
||||
static UINT FocusBorderHeight = 1;
|
||||
static UINT FocusBorderWidth = 1;
|
||||
@@ -940,6 +941,12 @@ IntSystemParametersInfo(
|
||||
pMetrics.iMenuHeight = UserGetSystemMetrics(SM_CYMENUSIZE);
|
||||
pMetrics.cbSize = sizeof(NONCLIENTMETRICSW);
|
||||
|
||||
MinimizedMetrics.cbSize = sizeof(MINIMIZEDMETRICS);
|
||||
MinimizedMetrics.iWidth = UserGetSystemMetrics(SM_CXMINIMIZED);
|
||||
MinimizedMetrics.iHorzGap = UserGetSystemMetrics(SM_CXMINSPACING);
|
||||
MinimizedMetrics.iVertGap = UserGetSystemMetrics(SM_CYMINSPACING);
|
||||
MinimizedMetrics.iArrange = ARW_HIDE;
|
||||
|
||||
bInitialized = TRUE;
|
||||
}
|
||||
|
||||
@@ -1288,6 +1295,18 @@ IntSystemParametersInfo(
|
||||
pMetrics = *((NONCLIENTMETRICSW*)pvParam);
|
||||
return TRUE;
|
||||
}
|
||||
case SPI_GETMINIMIZEDMETRICS:
|
||||
{
|
||||
ASSERT(pvParam);
|
||||
*((MINIMIZEDMETRICS*)pvParam) = MinimizedMetrics;
|
||||
return TRUE;
|
||||
}
|
||||
case SPI_SETMINIMIZEDMETRICS:
|
||||
{
|
||||
ASSERT(pvParam);
|
||||
MinimizedMetrics = *((MINIMIZEDMETRICS*)pvParam);
|
||||
return TRUE;
|
||||
}
|
||||
case SPI_GETFOCUSBORDERHEIGHT:
|
||||
{
|
||||
ASSERT(pvParam);
|
||||
@@ -1480,6 +1499,35 @@ UserSystemParametersInfo(
|
||||
}
|
||||
return( TRUE);
|
||||
}
|
||||
case SPI_GETMINIMIZEDMETRICS:
|
||||
case SPI_SETMINIMIZEDMETRICS:
|
||||
{
|
||||
MINIMIZEDMETRICS minimetrics;
|
||||
|
||||
Status = MmCopyFromCaller(&minimetrics, pvParam, sizeof(MINIMIZEDMETRICS));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
if(minimetrics.cbSize != sizeof(MINIMIZEDMETRICS))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
if(!IntSystemParametersInfo(uiAction, uiParam, &minimetrics, fWinIni))
|
||||
{
|
||||
return( FALSE);
|
||||
}
|
||||
|
||||
Status = MmCopyToCaller(pvParam, &minimetrics, sizeof(MINIMIZEDMETRICS));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
return( TRUE);
|
||||
}
|
||||
default :
|
||||
{
|
||||
DPRINT1("FIXME: UNIMPLEMENTED SPI Code: %lx \n",uiAction );
|
||||
|
||||
Reference in New Issue
Block a user