mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Various fixes by Filip Navara
svn path=/trunk/; revision=5912
This commit is contained in:
parent
12c2e7f892
commit
6f5012a900
12 changed files with 988 additions and 919 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: desktop.c,v 1.26 2003/08/28 18:04:59 weiden Exp $
|
||||
/* $Id: desktop.c,v 1.27 2003/08/29 09:29:11 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -41,34 +41,49 @@ SystemParametersInfoA(UINT uiAction,
|
|||
PVOID pvParam,
|
||||
UINT fWinIni)
|
||||
{
|
||||
WINBOOL Ret;
|
||||
NONCLIENTMETRICSA *nclma;
|
||||
NONCLIENTMETRICSW nclmw;
|
||||
|
||||
switch (uiAction)
|
||||
{
|
||||
case SPI_GETWORKAREA:
|
||||
{
|
||||
return SystemParametersInfoW(uiAction, uiParam, pvParam, fWinIni);
|
||||
}
|
||||
case SPI_GETNONCLIENTMETRICS:
|
||||
nclma = pvParam;
|
||||
nclmw.cbSize = sizeof(NONCLIENTMETRICSW);
|
||||
uiParam = sizeof(NONCLIENTMETRICSW);
|
||||
pvParam = &nclmw;
|
||||
break;
|
||||
}
|
||||
Ret = SystemParametersInfoW(uiAction, uiParam, pvParam, fWinIni);
|
||||
if (! Ret)
|
||||
{
|
||||
return FALSE;
|
||||
{
|
||||
LPNONCLIENTMETRICSA nclma = (LPNONCLIENTMETRICSA)pvParam;
|
||||
NONCLIENTMETRICSW nclmw;
|
||||
nclmw.cbSize = sizeof(NONCLIENTMETRICSW);
|
||||
|
||||
if (!SystemParametersInfoW(uiAction, sizeof(NONCLIENTMETRICSW),
|
||||
&nclmw, fWinIni))
|
||||
return FALSE;
|
||||
|
||||
nclma->iBorderWidth = nclmw.iBorderWidth;
|
||||
nclma->iScrollWidth = nclmw.iScrollWidth;
|
||||
nclma->iScrollHeight = nclmw.iScrollHeight;
|
||||
nclma->iCaptionWidth = nclmw.iCaptionWidth;
|
||||
nclma->iCaptionHeight = nclmw.iCaptionHeight;
|
||||
nclma->iSmCaptionWidth = nclmw.iSmCaptionWidth;
|
||||
nclma->iSmCaptionHeight = nclmw.iSmCaptionHeight;
|
||||
nclma->iMenuWidth = nclmw.iMenuWidth;
|
||||
nclma->iMenuHeight = nclmw.iMenuHeight;
|
||||
RosRtlLogFontW2A(&(nclma->lfCaptionFont), &(nclmw.lfCaptionFont));
|
||||
RosRtlLogFontW2A(&(nclma->lfSmCaptionFont), &(nclmw.lfSmCaptionFont));
|
||||
RosRtlLogFontW2A(&(nclma->lfMenuFont), &(nclmw.lfMenuFont));
|
||||
RosRtlLogFontW2A(&(nclma->lfStatusFont), &(nclmw.lfStatusFont));
|
||||
RosRtlLogFontW2A(&(nclma->lfMessageFont), &(nclmw.lfMessageFont));
|
||||
return TRUE;
|
||||
}
|
||||
case SPI_GETICONTITLELOGFONT:
|
||||
{
|
||||
LOGFONTW lfw;
|
||||
if (!SystemParametersInfoW(uiAction, 0, &lfw, fWinIni))
|
||||
return FALSE;
|
||||
RosRtlLogFontW2A(pvParam, &lfw);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
switch (uiAction)
|
||||
{
|
||||
case SPI_GETNONCLIENTMETRICS:
|
||||
RosRtlLogFontW2A(&(nclma->lfCaptionFont), &(nclmw.lfCaptionFont));
|
||||
RosRtlLogFontW2A(&(nclma->lfSmCaptionFont), &(nclmw.lfSmCaptionFont));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,41 +96,7 @@ SystemParametersInfoW(UINT uiAction,
|
|||
PVOID pvParam,
|
||||
UINT fWinIni)
|
||||
{
|
||||
NONCLIENTMETRICSW *nclm;
|
||||
|
||||
/* FIXME: This should be obtained from the registry */
|
||||
static LOGFONTW CaptionFont =
|
||||
{ 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
|
||||
0, 0, DEFAULT_QUALITY, FF_MODERN, L"Bitstream Vera Sans Bold" };
|
||||
|
||||
switch (uiAction)
|
||||
{
|
||||
case SPI_GETWORKAREA:
|
||||
{
|
||||
/* FIXME we should obtain the information using GetMonitorInfo(),
|
||||
besides it is not the whole screen size! */
|
||||
((PRECT)pvParam)->left = 0;
|
||||
((PRECT)pvParam)->top = 0;
|
||||
((PRECT)pvParam)->right = 640;
|
||||
((PRECT)pvParam)->bottom = 480;
|
||||
return(TRUE);
|
||||
}
|
||||
case SPI_GETNONCLIENTMETRICS:
|
||||
{
|
||||
nclm = pvParam;
|
||||
memcpy(&nclm->lfCaptionFont, &CaptionFont, sizeof(CaptionFont));
|
||||
memcpy(&nclm->lfSmCaptionFont, &CaptionFont, sizeof(CaptionFont));
|
||||
return(TRUE);
|
||||
}
|
||||
default:
|
||||
{
|
||||
return NtUserSystemParametersInfo(uiAction,
|
||||
uiParam,
|
||||
pvParam,
|
||||
fWinIni);
|
||||
}
|
||||
}
|
||||
return(FALSE);
|
||||
return NtUserSystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: menu.c,v 1.31 2003/08/28 10:39:44 weiden Exp $
|
||||
/* $Id: menu.c,v 1.32 2003/08/29 09:29:11 gvg Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/menu.c
|
||||
|
@ -262,6 +262,7 @@ MenuInit(VOID)
|
|||
/* get the menu font */
|
||||
if(!hMenuFont || !hMenuFontBold)
|
||||
{
|
||||
ncm.cbSize = sizeof(ncm);
|
||||
if(!SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0))
|
||||
{
|
||||
DbgPrint("MenuInit(): SystemParametersInfoW(SPI_GETNONCLIENTMETRICS) failed!\n");
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: messagebox.c,v 1.15 2003/08/22 16:01:01 weiden Exp $
|
||||
/* $Id: messagebox.c,v 1.16 2003/08/29 09:29:11 gvg Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/messagebox.c
|
||||
|
@ -88,7 +88,7 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMS lpmb)
|
|||
NONCLIENTMETRICSW nclm;
|
||||
|
||||
nclm.cbSize = sizeof(nclm);
|
||||
SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0);
|
||||
SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof(nclm), &nclm, 0);
|
||||
hFont = CreateFontIndirectW (&nclm.lfMessageFont);
|
||||
/* set button font */
|
||||
for (i = 1; i < 10; i++)
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: metric.c,v 1.11 2003/08/28 18:04:59 weiden Exp $
|
||||
/* $Id: metric.c,v 1.12 2003/08/29 09:29:11 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Window classes
|
||||
* FILE: subsys/win32k/ntuser/class.c
|
||||
* FILE: subsys/win32k/ntuser/metric.c
|
||||
* PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* REVISION HISTORY:
|
||||
* 06-06-2001 CSH Created
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: misc.c,v 1.14 2003/08/28 18:04:59 weiden Exp $
|
||||
/* $Id: misc.c,v 1.15 2003/08/29 09:29:11 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -239,6 +239,12 @@ NtUserSystemParametersInfo(
|
|||
PVOID pvParam,
|
||||
UINT fWinIni)
|
||||
{
|
||||
/* FIXME: This should be obtained from the registry */
|
||||
static LOGFONTW CaptionFont =
|
||||
{ 14, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
||||
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"" };
|
||||
/* { 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
|
||||
0, 0, DEFAULT_QUALITY, FF_MODERN, L"Bitstream Vera Sans Bold" };*/
|
||||
NTSTATUS Status;
|
||||
PWINSTATION_OBJECT WinStaObject;
|
||||
|
||||
|
@ -274,6 +280,50 @@ NtUserSystemParametersInfo(
|
|||
|
||||
ObDereferenceObject(WinStaObject);
|
||||
return TRUE;
|
||||
|
||||
case SPI_GETWORKAREA:
|
||||
{
|
||||
((PRECT)pvParam)->left = 0;
|
||||
((PRECT)pvParam)->top = 0;
|
||||
((PRECT)pvParam)->right = 640;
|
||||
((PRECT)pvParam)->bottom = 480;
|
||||
return TRUE;
|
||||
}
|
||||
case SPI_GETICONTITLELOGFONT:
|
||||
{
|
||||
memcpy(pvParam, &CaptionFont, sizeof(CaptionFont));
|
||||
return TRUE;
|
||||
}
|
||||
case SPI_GETNONCLIENTMETRICS:
|
||||
{
|
||||
LPNONCLIENTMETRICSW pMetrics = (LPNONCLIENTMETRICSW)pvParam;
|
||||
|
||||
if (pMetrics->cbSize != sizeof(NONCLIENTMETRICSW) ||
|
||||
uiParam != sizeof(NONCLIENTMETRICSW))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
memset((char *)pvParam + sizeof(pMetrics->cbSize), 0,
|
||||
pMetrics->cbSize - sizeof(pMetrics->cbSize));
|
||||
|
||||
pMetrics->iBorderWidth = 1;
|
||||
pMetrics->iScrollWidth = NtUserGetSystemMetrics(SM_CXVSCROLL);
|
||||
pMetrics->iScrollHeight = NtUserGetSystemMetrics(SM_CYHSCROLL);
|
||||
pMetrics->iCaptionWidth = NtUserGetSystemMetrics(SM_CXSIZE);
|
||||
pMetrics->iCaptionHeight = NtUserGetSystemMetrics(SM_CYSIZE);
|
||||
memcpy((LPVOID)&(pMetrics->lfCaptionFont), &CaptionFont, sizeof(CaptionFont));
|
||||
pMetrics->lfCaptionFont.lfWeight = FW_BOLD;
|
||||
pMetrics->iSmCaptionWidth = NtUserGetSystemMetrics(SM_CXSMSIZE);
|
||||
pMetrics->iSmCaptionHeight = NtUserGetSystemMetrics(SM_CYSMSIZE);
|
||||
memcpy((LPVOID)&(pMetrics->lfSmCaptionFont), &CaptionFont, sizeof(CaptionFont));
|
||||
pMetrics->iMenuWidth = NtUserGetSystemMetrics(SM_CXMENUSIZE);
|
||||
pMetrics->iMenuHeight = NtUserGetSystemMetrics(SM_CYMENUSIZE);
|
||||
memcpy((LPVOID)&(pMetrics->lfMenuFont), &CaptionFont, sizeof(CaptionFont));
|
||||
memcpy((LPVOID)&(pMetrics->lfStatusFont), &CaptionFont, sizeof(CaptionFont));
|
||||
memcpy((LPVOID)&(pMetrics->lfMessageFont), &CaptionFont, sizeof(CaptionFont));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
return FALSE;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: window.c,v 1.105 2003/08/28 13:38:24 gvg Exp $
|
||||
/* $Id: window.c,v 1.106 2003/08/29 09:29:11 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -1347,30 +1347,29 @@ NtUserCreateWindowEx(DWORD dwExStyle,
|
|||
}
|
||||
|
||||
/* Send move and size messages. */
|
||||
/* FIXME: Breaks Solitaire, probably shouldn't be there. FiN */
|
||||
#if 0
|
||||
if (!(WindowObject->Flags & WINDOWOBJECT_NEED_SIZE))
|
||||
{
|
||||
LONG lParam;
|
||||
|
||||
DPRINT("NtUserCreateWindow(): About to send WM_SIZE\n");
|
||||
|
||||
if ((WindowObject->ClientRect.right - WindowObject->ClientRect.left) < 0 ||
|
||||
(WindowObject->ClientRect.bottom - WindowObject->ClientRect.top) < 0)
|
||||
DPRINT("Sending bogus WM_SIZE\n");
|
||||
|
||||
lParam =
|
||||
MAKE_LONG(WindowObject->ClientRect.right -
|
||||
lParam = MAKE_LONG(WindowObject->ClientRect.right -
|
||||
WindowObject->ClientRect.left,
|
||||
WindowObject->ClientRect.bottom -
|
||||
WindowObject->ClientRect.top);
|
||||
|
||||
DPRINT("NtUserCreateWindow(): About to send WM_SIZE\n");
|
||||
IntCallWindowProc(NULL, WindowObject->Self, WM_SIZE, SIZE_RESTORED,
|
||||
lParam);
|
||||
lParam =
|
||||
MAKE_LONG(WindowObject->ClientRect.left,
|
||||
WindowObject->ClientRect.top);
|
||||
DPRINT("NtUserCreateWindow(): About to send WM_MOVE\n");
|
||||
IntCallWindowProc(NULL, WindowObject->Self, WM_MOVE, 0, lParam);
|
||||
lParam);
|
||||
|
||||
WindowObject->Flags &= ~WINDOWOBJECT_NEED_SIZE;
|
||||
DPRINT("NtUserCreateWindow(): About to send WM_MOVE\n");
|
||||
|
||||
lParam = MAKE_LONG(WindowObject->ClientRect.left,
|
||||
WindowObject->ClientRect.top);
|
||||
IntCallWindowProc(NULL, WindowObject->Self, WM_MOVE, 0, lParam);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Move from parent-client to screen coordinates */
|
||||
if (0 != (WindowObject->Style & WS_CHILD))
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: winpos.c,v 1.28 2003/08/24 16:20:30 gvg Exp $
|
||||
/* $Id: winpos.c,v 1.29 2003/08/29 09:29:11 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -409,14 +409,18 @@ WinPosDoWinPosChanging(PWINDOW_OBJECT WindowObject,
|
|||
WindowRect->top = WinPos->y;
|
||||
WindowRect->right += WinPos->x - WindowObject->WindowRect.left;
|
||||
WindowRect->bottom += WinPos->y - WindowObject->WindowRect.top;
|
||||
NtGdiOffsetRect(ClientRect,
|
||||
WinPos->x - WindowObject->WindowRect.left,
|
||||
WinPos->y - WindowObject->WindowRect.top);
|
||||
}
|
||||
|
||||
WinPos->flags |= SWP_NOCLIENTMOVE | SWP_NOCLIENTSIZE;
|
||||
|
||||
if (!(WinPos->flags & SWP_NOSIZE) || !(WinPos->flags & SWP_NOMOVE))
|
||||
{
|
||||
WinPosGetNonClientSize(WindowObject->Self, WindowRect, ClientRect);
|
||||
}
|
||||
|
||||
WinPos->flags |= SWP_NOCLIENTMOVE | SWP_NOCLIENTSIZE;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
@ -957,7 +961,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
|||
}
|
||||
|
||||
/* FIXME: Check some conditions before doing this. */
|
||||
IntSendWINDOWPOSCHANGEDMessage(Window->Self, &WinPos);
|
||||
IntSendWINDOWPOSCHANGEDMessage(WinPos.hwnd, &WinPos);
|
||||
|
||||
ObmDereferenceObject(Window);
|
||||
return(TRUE);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: brush.c,v 1.25 2003/08/20 07:45:02 gvg Exp $
|
||||
/* $Id: brush.c,v 1.26 2003/08/29 09:29:11 gvg Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -45,7 +45,8 @@ HBRUSH STDCALL NtGdiCreateBrushIndirect(CONST LOGBRUSH *lb)
|
|||
}
|
||||
|
||||
brushPtr = BRUSHOBJ_LockBrush (hBrush);
|
||||
ASSERT( brushPtr ); //I want to know if this ever occurs
|
||||
/* FIXME: Occurs! FiN */
|
||||
/* ASSERT( brushPtr ); *///I want to know if this ever occurs
|
||||
|
||||
if( brushPtr ){
|
||||
brushPtr->iSolidColor = lb->lbColor;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: cliprgn.c,v 1.21 2003/08/20 07:45:02 gvg Exp $ */
|
||||
/* $Id: cliprgn.c,v 1.22 2003/08/29 09:29:11 gvg Exp $ */
|
||||
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
@ -43,6 +43,9 @@ CLIPPING_UpdateGCRegion(DC* Dc)
|
|||
Dc->w.hGCClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
if (Dc->w.hGCClipRgn == NULL)
|
||||
return;
|
||||
|
||||
if (Dc->w.hClipRgn == NULL)
|
||||
{
|
||||
NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hVisRgn, 0, RGN_COPY);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dc.c,v 1.75 2003/08/28 12:35:59 gvg Exp $
|
||||
/* $Id: dc.c,v 1.76 2003/08/29 09:29:11 gvg Exp $
|
||||
*
|
||||
* DC.C - Device context functions
|
||||
*
|
||||
|
@ -363,12 +363,6 @@ NtGdiCreatePrimarySurface(LPCWSTR Driver,
|
|||
|
||||
DPRINT("Enabling PDev\n");
|
||||
|
||||
#ifdef TODO
|
||||
PrimarySurface.DMW.dmBitsPerPel = 16;
|
||||
PrimarySurface.DMW.dmPelsWidth = 1024;
|
||||
PrimarySurface.DMW.dmPelsHeight = 768;
|
||||
PrimarySurface.DMW.dmDisplayFrequency = 60;
|
||||
#endif
|
||||
PrimarySurface.PDev =
|
||||
PrimarySurface.DriverFunctions.EnablePDev(&PrimarySurface.DMW,
|
||||
L"",
|
||||
|
@ -1525,7 +1519,7 @@ NtGdiSetDCState16 ( HDC hDC, HDC hDCSave )
|
|||
// ---------------------------------------------------- Private Interface
|
||||
|
||||
HDC FASTCALL
|
||||
DC_AllocDC(LPCWSTR Driver)
|
||||
DC_AllocDC(LPCWSTR Driver)
|
||||
{
|
||||
PDC NewDC;
|
||||
HDC hDC;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: text.c,v 1.47 2003/08/28 21:40:26 gvg Exp $ */
|
||||
/* $Id: text.c,v 1.48 2003/08/29 09:29:11 gvg Exp $ */
|
||||
|
||||
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
|
@ -253,8 +253,9 @@ TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont)
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
Status = STATUS_INVALID_HANDLE;
|
||||
/* FIXME */
|
||||
/* ASSERT(FALSE);*/
|
||||
Status = STATUS_INVALID_HANDLE;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -302,7 +303,10 @@ NtGdiCreateFont(int Height,
|
|||
|
||||
if (NULL != Face)
|
||||
{
|
||||
Status = MmCopyFromCaller(logfont.lfFaceName, Face, sizeof(logfont.lfFaceName));
|
||||
int Size = sizeof(logfont.lfFaceName) / sizeof(WCHAR);
|
||||
wcsncpy((wchar_t *)logfont.lfFaceName, Face, Size - 1);
|
||||
/* Be 101% sure to have '\0' at end of string */
|
||||
logfont.lfFaceName[Size - 1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue