Author: tkreuzer
Date: Mon Jan 8 05:18:58 2007
New Revision: 25361
URL:
http://svn.reactos.org/svn/reactos?rev=25361&view=rev
Log:
- implement SPI_GETMINIMIZEDMETRICS and SPI_SETMINIMIZEDMETRICS in IntSystemParametersInfo
and UserSystemParametersInfo
- add both to SystemParametersInfoA
See issue #1668 for more details.
Modified:
trunk/reactos/dll/win32/user32/misc/desktop.c
trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
Modified: trunk/reactos/dll/win32/user32/misc/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/desk…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/desktop.c (original)
+++ trunk/reactos/dll/win32/user32/misc/desktop.c Mon Jan 8 05:18:58 2007
@@ -107,6 +107,8 @@
case SPI_GETGRADIENTCAPTIONS:
case SPI_GETFOCUSBORDERHEIGHT:
case SPI_GETFOCUSBORDERWIDTH:
+ case SPI_GETMINIMIZEDMETRICS:
+ case SPI_SETMINIMIZEDMETRICS:
{
return NtUserSystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c Mon Jan 8 05:18:58 2007
@@ -913,6 +913,7 @@
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;
@@ -939,6 +940,12 @@
pMetrics.iMenuWidth = UserGetSystemMetrics(SM_CXMENUSIZE);
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 @@
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 @@
}
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 );