Author: tkreuzer Date: Tue Jan 9 04:19:52 2007 New Revision: 25391
URL: http://svn.reactos.org/svn/reactos?rev=25391&view=rev Log: implement SPI_SETNONCLIENTMETRICS in SystemParametersInfoA
Modified: trunk/reactos/dll/win32/user32/misc/desktop.c
Modified: trunk/reactos/dll/win32/user32/misc/desktop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/deskt... ============================================================================== --- trunk/reactos/dll/win32/user32/misc/desktop.c (original) +++ trunk/reactos/dll/win32/user32/misc/desktop.c Tue Jan 9 04:19:52 2007 @@ -38,6 +38,32 @@ DPRINT1("Desktop Class Atom!\n"); if (message == WM_NCCREATE) return TRUE; return 0; /* all other messages are ignored */ +} + +VOID +STDCALL +LogFontA2W(LPLOGFONTW pW, CONST LOGFONTA *pA) +{ +#define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, pA->f, len, pW->f, len ) +#define COPYN(f) pW->f = pA->f + + COPYN(lfHeight); + COPYN(lfWidth); + COPYN(lfEscapement); + COPYN(lfOrientation); + COPYN(lfWeight); + COPYN(lfItalic); + COPYN(lfUnderline); + COPYN(lfStrikeOut); + COPYN(lfCharSet); + COPYN(lfOutPrecision); + COPYN(lfClipPrecision); + COPYN(lfQuality); + COPYN(lfPitchAndFamily); + COPYS(lfFaceName,LF_FACESIZE); + +#undef COPYN +#undef COPYS }
VOID @@ -138,6 +164,32 @@ LogFontW2A(&(nclma->lfMessageFont), &(nclmw.lfMessageFont)); return TRUE; } + case SPI_SETNONCLIENTMETRICS: + { + LPNONCLIENTMETRICSA nclma = (LPNONCLIENTMETRICSA)pvParam; + NONCLIENTMETRICSW nclmw; + nclmw.cbSize = sizeof(NONCLIENTMETRICSW); + nclmw.iBorderWidth = nclma->iBorderWidth; + nclmw.iScrollWidth = nclma->iScrollWidth; + nclmw.iScrollHeight = nclma->iScrollHeight; + nclmw.iCaptionWidth = nclma->iCaptionWidth; + nclmw.iCaptionHeight = nclma->iCaptionHeight; + nclmw.iSmCaptionWidth = nclma->iSmCaptionWidth; + nclmw.iSmCaptionHeight = nclma->iSmCaptionHeight; + nclmw.iMenuWidth = nclma->iMenuWidth; + nclmw.iMenuHeight = nclma->iMenuHeight; + LogFontA2W(&(nclmw.lfCaptionFont), &(nclma->lfCaptionFont)); + LogFontA2W(&(nclmw.lfSmCaptionFont), &(nclma->lfSmCaptionFont)); + LogFontA2W(&(nclmw.lfMenuFont), &(nclma->lfMenuFont)); + LogFontA2W(&(nclmw.lfStatusFont), &(nclma->lfStatusFont)); + LogFontA2W(&(nclmw.lfMessageFont), &(nclma->lfMessageFont)); + + if (!SystemParametersInfoW(uiAction, sizeof(NONCLIENTMETRICSW), + &nclmw, fWinIni)) + return FALSE; + + return TRUE; + } case SPI_GETICONTITLELOGFONT: { LOGFONTW lfw;