mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +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:
parent
15b82d28e7
commit
29e164cf19
2 changed files with 50 additions and 0 deletions
|
@ -107,6 +107,8 @@ SystemParametersInfoA(UINT uiAction,
|
||||||
case SPI_GETGRADIENTCAPTIONS:
|
case SPI_GETGRADIENTCAPTIONS:
|
||||||
case SPI_GETFOCUSBORDERHEIGHT:
|
case SPI_GETFOCUSBORDERHEIGHT:
|
||||||
case SPI_GETFOCUSBORDERWIDTH:
|
case SPI_GETFOCUSBORDERWIDTH:
|
||||||
|
case SPI_GETMINIMIZEDMETRICS:
|
||||||
|
case SPI_SETMINIMIZEDMETRICS:
|
||||||
{
|
{
|
||||||
return NtUserSystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
|
return NtUserSystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
|
||||||
}
|
}
|
||||||
|
|
|
@ -913,6 +913,7 @@ IntSystemParametersInfo(
|
||||||
static BOOL bInitialized = FALSE;
|
static BOOL bInitialized = FALSE;
|
||||||
static LOGFONTW IconFont;
|
static LOGFONTW IconFont;
|
||||||
static NONCLIENTMETRICSW pMetrics;
|
static NONCLIENTMETRICSW pMetrics;
|
||||||
|
static MINIMIZEDMETRICS MinimizedMetrics;
|
||||||
static BOOL GradientCaptions = TRUE;
|
static BOOL GradientCaptions = TRUE;
|
||||||
static UINT FocusBorderHeight = 1;
|
static UINT FocusBorderHeight = 1;
|
||||||
static UINT FocusBorderWidth = 1;
|
static UINT FocusBorderWidth = 1;
|
||||||
|
@ -940,6 +941,12 @@ IntSystemParametersInfo(
|
||||||
pMetrics.iMenuHeight = UserGetSystemMetrics(SM_CYMENUSIZE);
|
pMetrics.iMenuHeight = UserGetSystemMetrics(SM_CYMENUSIZE);
|
||||||
pMetrics.cbSize = sizeof(NONCLIENTMETRICSW);
|
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;
|
bInitialized = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1288,6 +1295,18 @@ IntSystemParametersInfo(
|
||||||
pMetrics = *((NONCLIENTMETRICSW*)pvParam);
|
pMetrics = *((NONCLIENTMETRICSW*)pvParam);
|
||||||
return TRUE;
|
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:
|
case SPI_GETFOCUSBORDERHEIGHT:
|
||||||
{
|
{
|
||||||
ASSERT(pvParam);
|
ASSERT(pvParam);
|
||||||
|
@ -1480,6 +1499,35 @@ UserSystemParametersInfo(
|
||||||
}
|
}
|
||||||
return( TRUE);
|
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 :
|
default :
|
||||||
{
|
{
|
||||||
DPRINT1("FIXME: UNIMPLEMENTED SPI Code: %lx \n",uiAction );
|
DPRINT1("FIXME: UNIMPLEMENTED SPI Code: %lx \n",uiAction );
|
||||||
|
|
Loading…
Reference in a new issue