mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
implement SPI_SETNONCLIENTMETRICS in SystemParametersInfoA
svn path=/trunk/; revision=25391
This commit is contained in:
parent
5b83954756
commit
0202185efa
1 changed files with 52 additions and 0 deletions
|
@ -40,6 +40,32 @@ DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
|
|||
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
|
||||
STDCALL
|
||||
LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW)
|
||||
|
@ -138,6 +164,32 @@ SystemParametersInfoA(UINT uiAction,
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue