mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 12:06:52 +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,35 +41,50 @@ SystemParametersInfoA(UINT uiAction,
|
|||
PVOID pvParam,
|
||||
UINT fWinIni)
|
||||
{
|
||||
WINBOOL Ret;
|
||||
NONCLIENTMETRICSA *nclma;
|
||||
switch (uiAction)
|
||||
{
|
||||
case SPI_GETWORKAREA:
|
||||
{
|
||||
return SystemParametersInfoW(uiAction, uiParam, pvParam, fWinIni);
|
||||
}
|
||||
case SPI_GETNONCLIENTMETRICS:
|
||||
{
|
||||
LPNONCLIENTMETRICSA nclma = (LPNONCLIENTMETRICSA)pvParam;
|
||||
NONCLIENTMETRICSW nclmw;
|
||||
|
||||
switch (uiAction)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
switch (uiAction)
|
||||
{
|
||||
case SPI_GETNONCLIENTMETRICS:
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: defwnd.c,v 1.73 2003/08/20 21:42:27 gvg Exp $
|
||||
/* $Id: defwnd.c,v 1.74 2003/08/29 09:29:11 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -131,7 +131,6 @@ UserSetupInternalPos( VOID )
|
|||
AtomInternalPos = GlobalAddAtomA(Str);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
@ -141,24 +140,24 @@ GetSysColor(int nIndex)
|
|||
return SysColours[nIndex];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
HPEN STDCALL
|
||||
GetSysColorPen(int nIndex)
|
||||
{
|
||||
return(CreatePen(PS_SOLID, 1, SysColours[nIndex]));
|
||||
return CreatePen(PS_SOLID, 1, SysColours[nIndex]);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
HBRUSH STDCALL
|
||||
GetSysColorBrush(int nIndex)
|
||||
{
|
||||
return(CreateSolidBrush(SysColours[nIndex]));
|
||||
return CreateSolidBrush(SysColours[nIndex]);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
@ -198,8 +197,8 @@ UserGetInternalPos(HWND hWnd)
|
|||
BOOL
|
||||
DefWndRedrawIconTitle(HWND hWnd)
|
||||
{
|
||||
PINTERNALPOS lpPos = (PINTERNALPOS)GetPropA(hWnd,
|
||||
(LPSTR)(DWORD)AtomInternalPos);
|
||||
PINTERNALPOS lpPos = (PINTERNALPOS)GetPropA(hWnd, (LPSTR)(DWORD)AtomInternalPos);
|
||||
|
||||
if (lpPos != NULL)
|
||||
{
|
||||
if (lpPos->IconTitle != NULL)
|
||||
|
@ -212,14 +211,12 @@ DefWndRedrawIconTitle(HWND hWnd)
|
|||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
UserHasMenu(HWND hWnd, ULONG Style)
|
||||
{
|
||||
return (!(Style & WS_CHILD) && GetMenu(hWnd) != 0);
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
UserHasAnyFrameStyle(ULONG Style, ULONG ExStyle)
|
||||
{
|
||||
|
@ -228,7 +225,6 @@ UserHasAnyFrameStyle(ULONG Style, ULONG ExStyle)
|
|||
(!(Style & (WS_CHILD | WS_POPUP))));
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
UserHasDlgFrameStyle(ULONG Style, ULONG ExStyle)
|
||||
{
|
||||
|
@ -236,7 +232,6 @@ UserHasDlgFrameStyle(ULONG Style, ULONG ExStyle)
|
|||
((Style & WS_DLGFRAME) && (!(Style & WS_THICKFRAME))));
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
UserHasThickFrameStyle(ULONG Style, ULONG ExStyle)
|
||||
{
|
||||
|
@ -244,15 +239,12 @@ UserHasThickFrameStyle(ULONG Style, ULONG ExStyle)
|
|||
(!((Style & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)));
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
UserHasThinFrameStyle(ULONG Style, ULONG ExStyle)
|
||||
{
|
||||
return((Style & WS_BORDER) ||
|
||||
(!(Style & (WS_CHILD | WS_POPUP))));
|
||||
return ((Style & WS_BORDER) || (!(Style & (WS_CHILD | WS_POPUP))));
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
UserHasBigFrameStyle(ULONG Style, ULONG ExStyle)
|
||||
{
|
||||
|
@ -311,40 +303,43 @@ UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT Rect, BOOL down )
|
|||
{
|
||||
HDC hDcMem;
|
||||
HBITMAP hSavedBitmap;
|
||||
WINBOOL result = FALSE;
|
||||
|
||||
if (!hbSysMenu)
|
||||
{
|
||||
hbSysMenu = (HBITMAP)LoadBitmapW(0, MAKEINTRESOURCEW(OBM_CLOSE));
|
||||
}
|
||||
hDcMem = CreateCompatibleDC(hDC);
|
||||
if (! hDcMem) goto cleanup;
|
||||
if (!hDcMem)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
hSavedBitmap = SelectObject(hDcMem, hbSysMenu);
|
||||
if (! hSavedBitmap) goto cleanup;
|
||||
if (!hSavedBitmap)
|
||||
{
|
||||
DeleteDC(hDcMem);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BitBlt(hDC, Rect->left + 2, Rect->top +
|
||||
2, 16, 16, hDcMem,
|
||||
BitBlt(hDC, Rect->left + 2, Rect->top + 2, 16, 16, hDcMem,
|
||||
(GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD) ?
|
||||
GetSystemMetrics(SM_CXSIZE): 0, 0, SRCCOPY);
|
||||
|
||||
result = TRUE;
|
||||
|
||||
cleanup:
|
||||
if (hDcMem)
|
||||
{
|
||||
if(hSavedBitmap) SelectObject(hDcMem, hSavedBitmap);
|
||||
SelectObject(hDcMem, hSavedBitmap);
|
||||
DeleteDC(hDcMem);
|
||||
}
|
||||
return result;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* FIXME: Cache bitmaps, then just bitblt instead of calling DFC() (and
|
||||
wasting precious CPU cycles) every time */
|
||||
|
||||
/*
|
||||
* FIXME:
|
||||
* Cache bitmaps, then just bitblt instead of calling DFC() (and
|
||||
* wasting precious CPU cycles) every time
|
||||
*/
|
||||
static void
|
||||
UserDrawCaptionButton(HWND hWnd, HDC hDC, BOOL bDown, ULONG Type)
|
||||
{
|
||||
RECT rect;
|
||||
INT iBmpWidth = GetSystemMetrics(SM_CXSIZE) - 2;
|
||||
INT iBmpHeight = GetSystemMetrics(SM_CYSIZE) - 4;
|
||||
|
||||
INT OffsetX = UIGetFrameSizeX(hWnd);
|
||||
INT OffsetY = UIGetFrameSizeY(hWnd);
|
||||
|
||||
|
@ -366,10 +361,8 @@ UserDrawCaptionButton( HWND hWnd, HDC hDC, BOOL bDown, ULONG Type )
|
|||
if ((GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) == TRUE)
|
||||
return; /* ToolWindows don't have min/max buttons */
|
||||
|
||||
SetRect(&rect,
|
||||
rect.right - OffsetX - (iBmpWidth*3) - 5,
|
||||
OffsetY + 2,
|
||||
rect.right - (iBmpWidth * 2) - OffsetX - 5,
|
||||
SetRect(&rect, rect.right - OffsetX - (iBmpWidth * 3) - 5,
|
||||
OffsetY + 2, rect.right - (iBmpWidth * 2) - OffsetX - 5,
|
||||
rect.top + iBmpHeight + OffsetY + 2);
|
||||
DrawFrameControl(hDC, &rect, DFC_CAPTION,
|
||||
DFCS_CAPTIONMIN | (bDown ? DFCS_PUSHED : 0) |
|
||||
|
@ -380,12 +373,10 @@ UserDrawCaptionButton( HWND hWnd, HDC hDC, BOOL bDown, ULONG Type )
|
|||
{
|
||||
if ((GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) == TRUE)
|
||||
return; /* ToolWindows don't have min/max buttons */
|
||||
SetRect(&rect,
|
||||
rect.right - OffsetX - (iBmpWidth*2) - 5,
|
||||
OffsetY + 2,
|
||||
rect.right - iBmpWidth - OffsetX - 5,
|
||||
rect.top + iBmpHeight + OffsetY + 2 );
|
||||
|
||||
SetRect(&rect, rect.right - OffsetX - (iBmpWidth * 2) - 5,
|
||||
OffsetY + 2, rect.right - iBmpWidth - OffsetX - 5,
|
||||
rect.top + iBmpHeight + OffsetY + 2);
|
||||
DrawFrameControl(hDC, &rect, DFC_CAPTION,
|
||||
(IsZoomed(hWnd) ? DFCS_CAPTIONRESTORE : DFCS_CAPTIONMAX) |
|
||||
(bDown ? DFCS_PUSHED : 0) |
|
||||
|
@ -394,21 +385,17 @@ UserDrawCaptionButton( HWND hWnd, HDC hDC, BOOL bDown, ULONG Type )
|
|||
}
|
||||
case DFCS_CAPTIONCLOSE:
|
||||
{
|
||||
SetRect(&rect,
|
||||
rect.right - OffsetX - iBmpWidth - 3,
|
||||
OffsetY + 2,
|
||||
rect.right - OffsetX - 3,
|
||||
SetRect(&rect, rect.right - OffsetX - iBmpWidth - 3,
|
||||
OffsetY + 2, rect.right - OffsetX - 3,
|
||||
rect.top + iBmpHeight + OffsetY + 2 );
|
||||
|
||||
DrawFrameControl(hDC, &rect, DFC_CAPTION,
|
||||
(DFCS_CAPTIONCLOSE |
|
||||
(bDown ? DFCS_PUSHED : 0) |
|
||||
(DFCS_CAPTIONCLOSE | (bDown ? DFCS_PUSHED : 0) |
|
||||
(IsCloseBoxActive(hWnd) ? 0 : DFCS_INACTIVE)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Enabling this will cause captions to draw smoother, but slower:
|
||||
// #define DOUBLE_BUFFER_CAPTION
|
||||
// NOTE: Double buffering appears to be broken for this at the moment
|
||||
|
@ -416,8 +403,7 @@ UserDrawCaptionButton( HWND hWnd, HDC hDC, BOOL bDown, ULONG Type )
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
WINBOOL
|
||||
STDCALL
|
||||
WINBOOL STDCALL
|
||||
DrawCaption(
|
||||
HWND hWnd,
|
||||
HDC hDC,
|
||||
|
@ -429,14 +415,13 @@ DrawCaption(
|
|||
RECT r = *lprc;
|
||||
UINT VCenter = 0, Padding = 0;
|
||||
WCHAR buffer[256];
|
||||
HFONT hFont = NULL,
|
||||
hOldFont = NULL;
|
||||
HFONT hFont = NULL;
|
||||
HFONT hOldFont = NULL;
|
||||
HBRUSH OldBrush = NULL;
|
||||
HDC MemDC = NULL;
|
||||
|
||||
#ifdef DOUBLE_BUFFER_CAPTION
|
||||
HBITMAP MemBMP = NULL,
|
||||
OldBMP = NULL;
|
||||
HBITMAP MemBMP = NULL, OldBMP = NULL;
|
||||
|
||||
MemDC = CreateCompatibleDC(hDC);
|
||||
if (! MemDC) goto cleanup;
|
||||
|
@ -500,7 +485,7 @@ DrawCaption(
|
|||
r.right = (lprc->right - lprc->left);
|
||||
|
||||
nclm.cbSize = sizeof(nclm);
|
||||
if (! SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, 0, &nclm, 0)) goto cleanup;
|
||||
if (! SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &nclm, 0)) goto cleanup;
|
||||
|
||||
if (uFlags & DC_INBUTTON)
|
||||
SetTextColor(MemDC, SysColours[ uFlags & DC_ACTIVE ? COLOR_BTNTEXT : COLOR_GRAYTEXT]);
|
||||
|
@ -1541,7 +1526,6 @@ DefWndAdjustRect(RECT* Rect, ULONG Style, BOOL Menu, ULONG ExStyle)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
LRESULT STDCALL
|
||||
DefWndNCCalcSize(HWND hWnd, RECT* Rect)
|
||||
{
|
||||
|
@ -1566,24 +1550,64 @@ DefWndNCCalcSize(HWND hWnd, RECT* Rect)
|
|||
Rect->top -= TmpRect.top;
|
||||
Rect->right -= TmpRect.right;
|
||||
Rect->bottom -= TmpRect.bottom;
|
||||
if (UserHasMenu(hWnd, GetWindowLongW(hWnd, GWL_EXSTYLE)))
|
||||
if (UserHasMenu(hWnd, GetWindowLongW(hWnd, GWL_STYLE)))
|
||||
{
|
||||
Rect->top += MenuGetMenuBarHeight(hWnd,
|
||||
Rect->right - Rect->left,
|
||||
-TmpRect.left,
|
||||
-TmpRect.top) + 1;
|
||||
Rect->top += MenuGetMenuBarHeight(hWnd, Rect->right - Rect->left,
|
||||
-TmpRect.left, -TmpRect.top) + 1;
|
||||
}
|
||||
Rect->bottom = max(Rect->top, Rect->bottom);
|
||||
Rect->right = max(Rect->left, Rect->right);
|
||||
}
|
||||
return(Result);
|
||||
if (Rect->top > Rect->bottom)
|
||||
Rect->bottom = Rect->top;
|
||||
if (Rect->left > Rect->right)
|
||||
Rect->right = Rect->left;
|
||||
}
|
||||
|
||||
return (Result);
|
||||
}
|
||||
|
||||
LRESULT
|
||||
DefWndHandleWindowPosChanging(HWND hWnd, WINDOWPOS* Pos)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
POINT maxSize, minTrack;
|
||||
LONG style = GetWindowLongA(hWnd, GWL_STYLE);
|
||||
|
||||
if (Pos->flags & SWP_NOSIZE) return 0;
|
||||
if ((style & WS_THICKFRAME) || ((style & (WS_POPUP | WS_CHILD)) == 0))
|
||||
{
|
||||
WinPosGetMinMaxInfo(hWnd, &maxSize, NULL, &minTrack, NULL);
|
||||
Pos->cx = min(Pos->cx, maxSize.x);
|
||||
Pos->cy = min(Pos->cy, maxSize.y);
|
||||
if (!(style & WS_MINIMIZE))
|
||||
{
|
||||
if (Pos->cx < minTrack.x) Pos->cx = minTrack.x;
|
||||
if (Pos->cy < minTrack.y) Pos->cy = minTrack.y;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Undocumented flags. */
|
||||
#define SWP_NOCLIENTMOVE 0x0800
|
||||
#define SWP_NOCLIENTSIZE 0x1000
|
||||
|
||||
LRESULT
|
||||
DefWndHandleWindowPosChanged(HWND hWnd, WINDOWPOS* Pos)
|
||||
{
|
||||
RECT rect;
|
||||
|
||||
GetClientRect(hWnd, &rect);
|
||||
|
||||
if (!(Pos->flags & SWP_NOCLIENTMOVE))
|
||||
SendMessageW(hWnd, WM_MOVE, 0, MAKELONG(rect.left, rect.top));
|
||||
|
||||
if (!(Pos->flags & SWP_NOCLIENTSIZE))
|
||||
{
|
||||
WPARAM wp = SIZE_RESTORED;
|
||||
if (IsZoomed(hWnd)) wp = SIZE_MAXIMIZED;
|
||||
else if (IsIconic(hWnd)) wp = SIZE_MINIMIZED;
|
||||
SendMessageW(hWnd, WM_SIZE, wp,
|
||||
MAKELONG(rect.right - rect.left, rect.bottom - rect.top));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1601,10 +1625,22 @@ User32DefWindowProc(HWND hWnd,
|
|||
{
|
||||
return (DefWndPaintNC(hWnd, (HRGN)wParam));
|
||||
}
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
{
|
||||
return (DefWndNCCalcSize(hWnd, (RECT*)lParam));
|
||||
}
|
||||
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
{
|
||||
break;
|
||||
return (DefWndHandleWindowPosChanging(hWnd, (WINDOWPOS*)lParam));
|
||||
}
|
||||
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
{
|
||||
return (DefWndHandleWindowPosChanged(hWnd, (WINDOWPOS*)lParam));
|
||||
}
|
||||
|
||||
case WM_NCHITTEST:
|
||||
{
|
||||
POINT Point;
|
||||
|
@ -1637,10 +1673,7 @@ User32DefWindowProc(HWND hWnd,
|
|||
}
|
||||
break;
|
||||
}
|
||||
case WM_LBUTTONUP:
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_RBUTTONUP:
|
||||
{
|
||||
POINT Pt;
|
||||
|
@ -1663,12 +1696,6 @@ User32DefWindowProc(HWND hWnd,
|
|||
break;
|
||||
}
|
||||
|
||||
case WM_NCRBUTTONUP:
|
||||
{
|
||||
/* Wine does nothing here. */
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_CONTEXTMENU:
|
||||
{
|
||||
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
|
||||
|
@ -1679,7 +1706,7 @@ User32DefWindowProc(HWND hWnd,
|
|||
}
|
||||
else
|
||||
{
|
||||
SendMessageA(hWnd, WM_CONTEXTMENU, wParam, lParam);
|
||||
SendMessageA(GetParent(hWnd), WM_CONTEXTMENU, wParam, lParam);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1689,7 +1716,6 @@ User32DefWindowProc(HWND hWnd,
|
|||
|
||||
Pt.x = SLOWORD(lParam);
|
||||
Pt.y = SHIWORD(lParam);
|
||||
|
||||
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
|
||||
{
|
||||
ScreenToClient(GetParent(hWnd), &Pt);
|
||||
|
@ -1712,13 +1738,9 @@ User32DefWindowProc(HWND hWnd,
|
|||
return (DefWndHandleActiveNC(hWnd, wParam));
|
||||
}
|
||||
|
||||
case WM_NCDESTROY:
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
case WM_PRINT:
|
||||
{
|
||||
/* FIXME: Implement. */
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -1834,9 +1856,9 @@ User32DefWindowProc(HWND hWnd,
|
|||
case WM_ERASEBKGND:
|
||||
case WM_ICONERASEBKGND:
|
||||
{
|
||||
|
||||
RECT Rect;
|
||||
HBRUSH hBrush = (HBRUSH)GetClassLongW(hWnd, GCL_HBRBACKGROUND);
|
||||
|
||||
if (NULL == hBrush)
|
||||
{
|
||||
return 0;
|
||||
|
@ -1850,12 +1872,17 @@ User32DefWindowProc(HWND hWnd,
|
|||
return (1);
|
||||
}
|
||||
|
||||
case WM_GETDLGCODE:
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
/* FIXME: Implement colour controls. */
|
||||
/*
|
||||
case WM_CTLCOLORMSGBOX:
|
||||
case WM_CTLCOLOREDIT:
|
||||
case WM_CTLCOLORLISTBOX:
|
||||
case WM_CTLCOLORBTN:
|
||||
case WM_CTLCOLORDLG:
|
||||
case WM_CTLCOLORSTATIC:
|
||||
case WM_CTLCOLORSCROLLBAR:
|
||||
case WM_CTLCOLOR:
|
||||
*/
|
||||
|
||||
case WM_SETCURSOR:
|
||||
{
|
||||
|
@ -1892,19 +1919,48 @@ User32DefWindowProc(HWND hWnd,
|
|||
}
|
||||
|
||||
/* FIXME: Handle key messages. */
|
||||
/*
|
||||
case WM_KEYDOWN:
|
||||
case WM_KEYUP:
|
||||
case WM_SYSKEYUP:
|
||||
case WM_SYSCHAR:
|
||||
*/
|
||||
|
||||
/* FIXME: This is also incomplete. */
|
||||
case WM_SYSKEYDOWN:
|
||||
{
|
||||
if (HIWORD(lParam) & KEYDATA_ALT)
|
||||
{
|
||||
if (wParam == VK_F4) /* Try to close the window */
|
||||
{
|
||||
HWND top = GetAncestor(hWnd, GA_ROOT);
|
||||
if (!(GetClassLongW(top, GCL_STYLE) & CS_NOCLOSE))
|
||||
{
|
||||
if (bUnicode)
|
||||
PostMessageW(top, WM_SYSCOMMAND, SC_CLOSE, 0);
|
||||
else
|
||||
PostMessageA(top, WM_SYSCOMMAND, SC_CLOSE, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_SHOWWINDOW:
|
||||
{
|
||||
if (lParam)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
/* FIXME: Not done correctly */
|
||||
if ((GetWindowLongW(hWnd, GWL_STYLE) & WS_VISIBLE && !wParam) ||
|
||||
(!(GetWindowLongW(hWnd, GWL_STYLE) & WS_VISIBLE) && wParam))
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
LONG Style;
|
||||
|
||||
if (!lParam)
|
||||
return 0;
|
||||
Style = GetWindowLongW(hWnd, GWL_STYLE);
|
||||
if (!(Style & WS_POPUP))
|
||||
return 0;
|
||||
if ((Style & WS_VISIBLE) && wParam)
|
||||
return 0;
|
||||
if (!(Style & WS_VISIBLE) && !wParam)
|
||||
return 0;
|
||||
if (!GetWindow(hWnd, GW_OWNER))
|
||||
return 0;
|
||||
ShowWindow(hWnd, wParam ? SW_SHOWNA : SW_HIDE);
|
||||
break;
|
||||
}
|
||||
|
@ -2000,27 +2056,11 @@ User32DefWindowProc(HWND hWnd,
|
|||
break;
|
||||
}
|
||||
|
||||
case WM_SYSKEYDOWN:
|
||||
if (HIWORD(lParam) & KEYDATA_ALT)
|
||||
case WM_QUERYOPEN:
|
||||
case WM_QUERYENDSESSION:
|
||||
{
|
||||
if (wParam == VK_F4) /* Try to close the window */
|
||||
{
|
||||
//HWND hTopWnd = GetAncestor(hWnd, GA_ROOT);
|
||||
HWND hTopWnd = hWnd;
|
||||
if (!(GetClassLongW(hTopWnd, GCL_STYLE) & CS_NOCLOSE))
|
||||
{
|
||||
if (bUnicode)
|
||||
{
|
||||
PostMessageW(hTopWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
|
||||
return (1);
|
||||
}
|
||||
else
|
||||
{
|
||||
PostMessageA(hTopWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -2032,7 +2072,6 @@ DefWindowProcA(HWND hWnd,
|
|||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
LRESULT Result;
|
||||
static LPSTR WindowTextAtom = 0;
|
||||
PSTR WindowText;
|
||||
|
||||
|
@ -2056,16 +2095,6 @@ DefWindowProcA(HWND hWnd,
|
|||
return (1);
|
||||
}
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
{
|
||||
return(DefWndNCCalcSize(hWnd, (RECT*)lParam));
|
||||
}
|
||||
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
{
|
||||
return(DefWndHandleWindowPosChanging(hWnd, (WINDOWPOS*)lParam));
|
||||
}
|
||||
|
||||
case WM_GETTEXTLENGTH:
|
||||
{
|
||||
if (WindowTextAtom == 0 ||
|
||||
|
@ -2111,10 +2140,21 @@ DefWindowProcA(HWND hWnd,
|
|||
{
|
||||
DefWndPaintNC(hWnd, (HRGN) 1);
|
||||
}
|
||||
Result = (LPARAM) TRUE;
|
||||
break;
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
FIXME: Implement these.
|
||||
case WM_IME_CHAR:
|
||||
case WM_IME_KEYDOWN:
|
||||
case WM_IME_KEYUP:
|
||||
case WM_IME_STARTCOMPOSITION:
|
||||
case WM_IME_COMPOSITION:
|
||||
case WM_IME_ENDCOMPOSITION:
|
||||
case WM_IME_SELECT:
|
||||
case WM_IME_SETCONTEXT:
|
||||
*/
|
||||
|
||||
case WM_NCDESTROY:
|
||||
{
|
||||
if (WindowTextAtom != 0 &&
|
||||
|
@ -2124,13 +2164,9 @@ DefWindowProcA(HWND hWnd,
|
|||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
default:
|
||||
Result = User32DefWindowProc(hWnd, Msg, wParam, lParam, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
return(Result);
|
||||
return User32DefWindowProc(hWnd, Msg, wParam, lParam, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2140,7 +2176,6 @@ DefWindowProcW(HWND hWnd,
|
|||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
LRESULT Result;
|
||||
static LPWSTR WindowTextAtom = 0;
|
||||
PWSTR WindowText;
|
||||
|
||||
|
@ -2148,8 +2183,8 @@ DefWindowProcW(HWND hWnd,
|
|||
{
|
||||
case WM_NCCREATE:
|
||||
{
|
||||
CREATESTRUCTW* Cs = (CREATESTRUCTW*)lParam;
|
||||
if (HIWORD(Cs->lpszName))
|
||||
CREATESTRUCTW* CreateStruct = (CREATESTRUCTW*)lParam;
|
||||
if (HIWORD(CreateStruct->lpszName))
|
||||
{
|
||||
if (0 == WindowTextAtom)
|
||||
{
|
||||
|
@ -2157,23 +2192,13 @@ DefWindowProcW(HWND hWnd,
|
|||
(LPWSTR)(DWORD)GlobalAddAtomW(L"USER32!WindowTextAtomW");
|
||||
}
|
||||
WindowText = RtlAllocateHeap(RtlGetProcessHeap(), 0,
|
||||
wcslen(Cs->lpszName) * sizeof(WCHAR));
|
||||
wcscpy(WindowText, Cs->lpszName);
|
||||
wcslen(CreateStruct->lpszName) * sizeof(WCHAR));
|
||||
wcscpy(WindowText, CreateStruct->lpszName);
|
||||
SetPropW(hWnd, WindowTextAtom, WindowText);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
{
|
||||
return(DefWndNCCalcSize(hWnd, (RECT*)lParam));
|
||||
}
|
||||
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
{
|
||||
return(DefWndHandleWindowPosChanging(hWnd, (WINDOWPOS*)lParam));
|
||||
}
|
||||
|
||||
case WM_GETTEXTLENGTH:
|
||||
{
|
||||
if (WindowTextAtom == 0 ||
|
||||
|
@ -2215,12 +2240,23 @@ DefWindowProcW(HWND hWnd,
|
|||
wcslen((PWSTR)lParam) * sizeof(WCHAR));
|
||||
wcscpy(WindowText, (PWSTR)lParam);
|
||||
SetPropW(hWnd, WindowTextAtom, WindowText);
|
||||
if (0 != (GetWindowLongW(hWnd, GWL_STYLE) & WS_CAPTION))
|
||||
if ((GetWindowLongW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
|
||||
{
|
||||
DefWndPaintNC(hWnd, (HRGN)1);
|
||||
}
|
||||
Result = (LPARAM) TRUE;
|
||||
break;
|
||||
return (1);
|
||||
}
|
||||
|
||||
case WM_IME_CHAR:
|
||||
{
|
||||
SendMessageW(hWnd, WM_CHAR, wParam, lParam);
|
||||
return (0);
|
||||
}
|
||||
|
||||
case WM_IME_SETCONTEXT:
|
||||
{
|
||||
/* FIXME */
|
||||
return (0);
|
||||
}
|
||||
|
||||
case WM_NCDESTROY:
|
||||
|
@ -2232,11 +2268,7 @@ DefWindowProcW(HWND hWnd,
|
|||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
default:
|
||||
Result = User32DefWindowProc(hWnd, Msg, wParam, lParam, TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
return(Result);
|
||||
return User32DefWindowProc(hWnd, Msg, wParam, lParam, 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: 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;
|
||||
|
||||
|
@ -275,6 +281,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;
|
||||
|
||||
lParam =
|
||||
MAKE_LONG(WindowObject->ClientRect.right -
|
||||
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 -
|
||||
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);
|
||||
|
||||
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"",
|
||||
|
|
|
@ -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,7 +253,8 @@ TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont)
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
/* FIXME */
|
||||
/* ASSERT(FALSE);*/
|
||||
Status = STATUS_INVALID_HANDLE;
|
||||
}
|
||||
}
|
||||
|
@ -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…
Add table
Add a link
Reference in a new issue