Replaced all occurences of SYSMETRICS_xx and sysMetrics[SM_xx] by

GetSystemMetrics(SM_xx), removed no longer needed includes of
sysmetrics.h.
oldstable
Marcus Meissner 1999-05-22 11:33:23 +00:00 committed by Alexandre Julliard
parent f7bd7adb91
commit ddca315388
26 changed files with 257 additions and 407 deletions

View File

@ -8,7 +8,6 @@
#include <string.h> #include <string.h>
#include "win.h" #include "win.h"
#include "button.h" #include "button.h"
#include "winuser.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "tweak.h" #include "tweak.h"

View File

@ -8,9 +8,10 @@
#include <string.h> #include <string.h>
#include "winbase.h"
#include "winuser.h" #include "winuser.h"
#include "wingdi.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "sysmetrics.h"
#include "win.h" #include "win.h"
#include "spy.h" #include "spy.h"
#include "user.h" #include "user.h"

View File

@ -9,7 +9,6 @@
#include <unistd.h> #include <unistd.h>
#include "winuser.h" #include "winuser.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "sysmetrics.h"
#include "win.h" #include "win.h"
#include "desktop.h" #include "desktop.h"
#include "heap.h" #include "heap.h"
@ -95,8 +94,9 @@ static BOOL ICONTITLE_GetTitlePos( WND* wnd, LPRECT lpRect )
{ {
HFONT hPrevFont = SelectObject( hDC, hIconTitleFont ); HFONT hPrevFont = SelectObject( hDC, hIconTitleFont );
SetRect( lpRect, 0, 0, sysMetrics[SM_CXICONSPACING] - SetRect( lpRect, 0, 0, GetSystemMetrics(SM_CXICONSPACING) -
SYSMETRICS_CXBORDER * 2, SYSMETRICS_CYBORDER * 2 ); GetSystemMetrics(SM_CXBORDER) * 2,
GetSystemMetrics(SM_CYBORDER) * 2 );
DrawTextA( hDC, str, length, lpRect, DT_CALCRECT | DrawTextA( hDC, str, length, lpRect, DT_CALCRECT |
DT_CENTER | DT_NOPREFIX | DT_WORDBREAK | DT_CENTER | DT_NOPREFIX | DT_WORDBREAK |
@ -105,11 +105,11 @@ static BOOL ICONTITLE_GetTitlePos( WND* wnd, LPRECT lpRect )
SelectObject( hDC, hPrevFont ); SelectObject( hDC, hPrevFont );
ReleaseDC( wnd->hwndSelf, hDC ); ReleaseDC( wnd->hwndSelf, hDC );
lpRect->right += 4 * SYSMETRICS_CXBORDER - lpRect->left; lpRect->right += 4 * GetSystemMetrics(SM_CXBORDER) - lpRect->left;
lpRect->left = wnd->owner->rectWindow.left + SYSMETRICS_CXICON / 2 - lpRect->left = wnd->owner->rectWindow.left + GetSystemMetrics(SM_CXICON) / 2 -
(lpRect->right - lpRect->left) / 2; (lpRect->right - lpRect->left) / 2;
lpRect->bottom -= lpRect->top; lpRect->bottom -= lpRect->top;
lpRect->top = wnd->owner->rectWindow.top + SYSMETRICS_CYICON; lpRect->top = wnd->owner->rectWindow.top + GetSystemMetrics(SM_CYICON);
} }
if( str != emptyTitleText ) HeapFree( GetProcessHeap(), 0, str ); if( str != emptyTitleText ) HeapFree( GetProcessHeap(), 0, str );
return ( hDC ) ? TRUE : FALSE; return ( hDC ) ? TRUE : FALSE;

View File

@ -20,7 +20,6 @@
#include "win.h" #include "win.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "sysmetrics.h"
#include "task.h" #include "task.h"
#include "heap.h" #include "heap.h"
#include "menu.h" #include "menu.h"
@ -783,9 +782,9 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
lpitem->rect.right += size.cx; lpitem->rect.right += size.cx;
if (TWEAK_WineLook == WIN31_LOOK) if (TWEAK_WineLook == WIN31_LOOK)
lpitem->rect.bottom += MAX( size.cy, SYSMETRICS_CYMENU ); lpitem->rect.bottom += MAX( size.cy, GetSystemMetrics(SM_CYMENU) );
else else
lpitem->rect.bottom += MAX (size.cy, sysMetrics[SM_CYMENU]- 1); lpitem->rect.bottom += MAX (size.cy, GetSystemMetrics(SM_CYMENU)-1);
lpitem->xTab = 0; lpitem->xTab = 0;
if (menuBar) if (menuBar)
@ -830,13 +829,13 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner )
SelectObject( hdc, hMenuFont); SelectObject( hdc, hMenuFont);
start = 0; start = 0;
maxX = (TWEAK_WineLook == WIN31_LOOK) ? SYSMETRICS_CXBORDER : 2 ; maxX = (TWEAK_WineLook == WIN31_LOOK) ? GetSystemMetrics(SM_CXBORDER) : 2 ;
while (start < lppop->nItems) while (start < lppop->nItems)
{ {
lpitem = &lppop->items[start]; lpitem = &lppop->items[start];
orgX = maxX; orgX = maxX;
orgY = (TWEAK_WineLook == WIN31_LOOK) ? SYSMETRICS_CYBORDER : 2; orgY = (TWEAK_WineLook == WIN31_LOOK) ? GetSystemMetrics(SM_CYBORDER) : 2;
maxTab = maxTabWidth = 0; maxTab = maxTabWidth = 0;
@ -1272,8 +1271,8 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
if(TWEAK_WineLook == WIN31_LOOK) if(TWEAK_WineLook == WIN31_LOOK)
{ {
rect.bottom -= POPUP_YSHADE * SYSMETRICS_CYBORDER; rect.bottom -= POPUP_YSHADE * GetSystemMetrics(SM_CYBORDER);
rect.right -= POPUP_XSHADE * SYSMETRICS_CXBORDER; rect.right -= POPUP_XSHADE * GetSystemMetrics(SM_CXBORDER);
} }
if((hPrevBrush = SelectObject( hdc, GetSysColorBrush(COLOR_MENU) )) if((hPrevBrush = SelectObject( hdc, GetSysColorBrush(COLOR_MENU) ))
@ -1297,13 +1296,13 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
i = rect.right; /* why SetBrushOrg() doesn't? */ i = rect.right; /* why SetBrushOrg() doesn't? */
PatBlt( hdc, i & 0xfffffffe, PatBlt( hdc, i & 0xfffffffe,
rect.top + POPUP_YSHADE*SYSMETRICS_CYBORDER, rect.top + POPUP_YSHADE*GetSystemMetrics(SM_CYBORDER),
i%2 + POPUP_XSHADE*SYSMETRICS_CXBORDER, i%2 + POPUP_XSHADE*GetSystemMetrics(SM_CXBORDER),
rect.bottom - rect.top, 0x00a000c9 ); rect.bottom - rect.top, 0x00a000c9 );
i = rect.bottom; i = rect.bottom;
PatBlt( hdc, rect.left + POPUP_XSHADE*SYSMETRICS_CXBORDER, PatBlt( hdc, rect.left + POPUP_XSHADE*GetSystemMetrics(SM_CXBORDER),
i & 0xfffffffe,rect.right - rect.left, i & 0xfffffffe,rect.right - rect.left,
i%2 + POPUP_YSHADE*SYSMETRICS_CYBORDER, 0x00a000c9 ); i%2 + POPUP_YSHADE*GetSystemMetrics(SM_CYBORDER), 0x00a000c9 );
SelectObject( hdc, hPrevPen ); SelectObject( hdc, hPrevPen );
SelectObject( hdc, hPrevBrush ); SelectObject( hdc, hPrevBrush );
SetROP2( hdc, ropPrev ); SetROP2( hdc, ropPrev );
@ -1349,7 +1348,7 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd,
lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR( (HMENU)wndPtr->wIDmenu ); lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR( (HMENU)wndPtr->wIDmenu );
if (lppop == NULL || lprect == NULL) if (lppop == NULL || lprect == NULL)
{ {
retvalue = SYSMETRICS_CYMENU; retvalue = GetSystemMetrics(SM_CYMENU);
goto END; goto END;
} }
@ -1385,7 +1384,7 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd,
if (lppop->nItems == 0) if (lppop->nItems == 0)
{ {
retvalue = SYSMETRICS_CYMENU; retvalue = GetSystemMetrics(SM_CYMENU);
goto END; goto END;
} }
@ -1494,31 +1493,31 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id,
/* adjust popup menu pos so that it fits within the desktop */ /* adjust popup menu pos so that it fits within the desktop */
width = menu->Width + SYSMETRICS_CXBORDER; width = menu->Width + GetSystemMetrics(SM_CXBORDER);
height = menu->Height + SYSMETRICS_CYBORDER; height = menu->Height + GetSystemMetrics(SM_CYBORDER);
if( x + width > SYSMETRICS_CXSCREEN ) if( x + width > GetSystemMetrics(SM_CXSCREEN ))
{ {
if( xanchor ) if( xanchor )
x -= width - xanchor; x -= width - xanchor;
if( x + width > SYSMETRICS_CXSCREEN) if( x + width > GetSystemMetrics(SM_CXSCREEN))
x = SYSMETRICS_CXSCREEN - width; x = GetSystemMetrics(SM_CXSCREEN) - width;
} }
if( x < 0 ) x = 0; if( x < 0 ) x = 0;
if( y + height > SYSMETRICS_CYSCREEN ) if( y + height > GetSystemMetrics(SM_CYSCREEN ))
{ {
if( yanchor ) if( yanchor )
y -= height + yanchor; y -= height + yanchor;
if( y + height > SYSMETRICS_CYSCREEN ) if( y + height > GetSystemMetrics(SM_CYSCREEN ))
y = SYSMETRICS_CYSCREEN - height; y = GetSystemMetrics(SM_CYSCREEN) - height;
} }
if( y < 0 ) y = 0; if( y < 0 ) y = 0;
if( TWEAK_WineLook == WIN31_LOOK ) if( TWEAK_WineLook == WIN31_LOOK )
{ {
width += POPUP_XSHADE * SYSMETRICS_CXBORDER; /* add space for shading */ width += POPUP_XSHADE * GetSystemMetrics(SM_CXBORDER); /* add space for shading */
height += POPUP_YSHADE * SYSMETRICS_CYBORDER; height += POPUP_YSHADE * GetSystemMetrics(SM_CYBORDER);
} }
/* NOTE: In Windows, top menu popup is not owned. */ /* NOTE: In Windows, top menu popup is not owned. */
@ -2058,8 +2057,8 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu,
NC_GetSysPopupPos( wndPtr, &rect ); NC_GetSysPopupPos( wndPtr, &rect );
rect.top = rect.bottom; rect.top = rect.bottom;
rect.right = SYSMETRICS_CXSIZE; rect.right = GetSystemMetrics(SM_CXSIZE);
rect.bottom = SYSMETRICS_CYSIZE; rect.bottom = GetSystemMetrics(SM_CYSIZE);
} }
else else
{ {
@ -3068,7 +3067,7 @@ UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
hdc = GetDCEx( hwnd, 0, DCX_CACHE | DCX_WINDOW ); hdc = GetDCEx( hwnd, 0, DCX_CACHE | DCX_WINDOW );
SelectObject( hdc, hMenuFont); SelectObject( hdc, hMenuFont);
SetRect(&rectBar, orgX, orgY, orgX+menubarWidth, orgY+SYSMETRICS_CYMENU); SetRect(&rectBar, orgX, orgY, orgX+menubarWidth, orgY+GetSystemMetrics(SM_CYMENU));
MENU_MenuBarCalcSize( hdc, &rectBar, lppop, hwnd ); MENU_MenuBarCalcSize( hdc, &rectBar, lppop, hwnd );
ReleaseDC( hwnd, hdc ); ReleaseDC( hwnd, hdc );
retvalue = lppop->Height; retvalue = lppop->Height;

View File

@ -6,7 +6,6 @@
*/ */
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "sysmetrics.h"
#include "scroll.h" #include "scroll.h"
#include "heap.h" #include "heap.h"
#include "win.h" #include "win.h"
@ -181,7 +180,7 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
lprect->left = wndPtr->rectClient.left - wndPtr->rectWindow.left; lprect->left = wndPtr->rectClient.left - wndPtr->rectWindow.left;
lprect->top = wndPtr->rectClient.bottom - wndPtr->rectWindow.top; lprect->top = wndPtr->rectClient.bottom - wndPtr->rectWindow.top;
lprect->right = wndPtr->rectClient.right - wndPtr->rectWindow.left; lprect->right = wndPtr->rectClient.right - wndPtr->rectWindow.left;
lprect->bottom = lprect->top + SYSMETRICS_CYHSCROLL; lprect->bottom = lprect->top + GetSystemMetrics(SM_CYHSCROLL);
if(wndPtr->dwStyle & WS_BORDER) { if(wndPtr->dwStyle & WS_BORDER) {
lprect->left--; lprect->left--;
lprect->right++; lprect->right++;
@ -193,7 +192,7 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
case SB_VERT: case SB_VERT:
lprect->left = wndPtr->rectClient.right - wndPtr->rectWindow.left; lprect->left = wndPtr->rectClient.right - wndPtr->rectWindow.left;
lprect->top = wndPtr->rectClient.top - wndPtr->rectWindow.top; lprect->top = wndPtr->rectClient.top - wndPtr->rectWindow.top;
lprect->right = lprect->left + SYSMETRICS_CXVSCROLL; lprect->right = lprect->left + GetSystemMetrics(SM_CXVSCROLL);
lprect->bottom = wndPtr->rectClient.bottom - wndPtr->rectWindow.top; lprect->bottom = wndPtr->rectClient.bottom - wndPtr->rectWindow.top;
if(wndPtr->dwStyle & WS_BORDER) { if(wndPtr->dwStyle & WS_BORDER) {
lprect->top--; lprect->top--;
@ -216,7 +215,7 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
if (vertical) pixels = lprect->bottom - lprect->top; if (vertical) pixels = lprect->bottom - lprect->top;
else pixels = lprect->right - lprect->left; else pixels = lprect->right - lprect->left;
if (pixels <= 2*SYSMETRICS_CXVSCROLL + SCROLL_MIN_RECT) if (pixels <= 2*GetSystemMetrics(SM_CXVSCROLL) + SCROLL_MIN_RECT)
{ {
if (pixels > SCROLL_MIN_RECT) if (pixels > SCROLL_MIN_RECT)
*arrowSize = (pixels - SCROLL_MIN_RECT) / 2; *arrowSize = (pixels - SCROLL_MIN_RECT) / 2;
@ -228,15 +227,15 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
{ {
SCROLLBAR_INFO *info = SCROLL_GetPtrScrollInfo( wndPtr, nBar ); SCROLLBAR_INFO *info = SCROLL_GetPtrScrollInfo( wndPtr, nBar );
*arrowSize = SYSMETRICS_CXVSCROLL; *arrowSize = GetSystemMetrics(SM_CXVSCROLL);
pixels -= (2 * (SYSMETRICS_CXVSCROLL - SCROLL_ARROW_THUMB_OVERLAP)); pixels -= (2 * (GetSystemMetrics(SM_CXVSCROLL) - SCROLL_ARROW_THUMB_OVERLAP));
if (info->Page) if (info->Page)
{ {
*thumbSize = pixels * info->Page / (info->MaxVal-info->MinVal+1); *thumbSize = pixels * info->Page / (info->MaxVal-info->MinVal+1);
if (*thumbSize < SCROLL_MIN_THUMB) *thumbSize = SCROLL_MIN_THUMB; if (*thumbSize < SCROLL_MIN_THUMB) *thumbSize = SCROLL_MIN_THUMB;
} }
else *thumbSize = SYSMETRICS_CXVSCROLL; else *thumbSize = GetSystemMetrics(SM_CXVSCROLL);
if (((pixels -= *thumbSize ) < 0) || if (((pixels -= *thumbSize ) < 0) ||
((info->flags & ESB_DISABLE_BOTH) == ESB_DISABLE_BOTH)) ((info->flags & ESB_DISABLE_BOTH) == ESB_DISABLE_BOTH))
@ -271,7 +270,7 @@ static UINT SCROLL_GetThumbVal( SCROLLBAR_INFO *infoPtr, RECT *rect,
INT thumbSize; INT thumbSize;
INT pixels = vertical ? rect->bottom-rect->top : rect->right-rect->left; INT pixels = vertical ? rect->bottom-rect->top : rect->right-rect->left;
if ((pixels -= 2*(SYSMETRICS_CXVSCROLL - SCROLL_ARROW_THUMB_OVERLAP)) <= 0) if ((pixels -= 2*(GetSystemMetrics(SM_CXVSCROLL) - SCROLL_ARROW_THUMB_OVERLAP)) <= 0)
return infoPtr->MinVal; return infoPtr->MinVal;
if (infoPtr->Page) if (infoPtr->Page)
@ -279,11 +278,11 @@ static UINT SCROLL_GetThumbVal( SCROLLBAR_INFO *infoPtr, RECT *rect,
thumbSize = pixels * infoPtr->Page/(infoPtr->MaxVal-infoPtr->MinVal+1); thumbSize = pixels * infoPtr->Page/(infoPtr->MaxVal-infoPtr->MinVal+1);
if (thumbSize < SCROLL_MIN_THUMB) thumbSize = SCROLL_MIN_THUMB; if (thumbSize < SCROLL_MIN_THUMB) thumbSize = SCROLL_MIN_THUMB;
} }
else thumbSize = SYSMETRICS_CXVSCROLL; else thumbSize = GetSystemMetrics(SM_CXVSCROLL);
if ((pixels -= thumbSize) <= 0) return infoPtr->MinVal; if ((pixels -= thumbSize) <= 0) return infoPtr->MinVal;
pos = MAX( 0, pos - (SYSMETRICS_CXVSCROLL - SCROLL_ARROW_THUMB_OVERLAP) ); pos = MAX( 0, pos - (GetSystemMetrics(SM_CXVSCROLL) - SCROLL_ARROW_THUMB_OVERLAP) );
if (pos > pixels) pos = pixels; if (pos > pixels) pos = pixels;
if (!infoPtr->Page) pos *= infoPtr->MaxVal - infoPtr->MinVal; if (!infoPtr->Page) pos *= infoPtr->MaxVal - infoPtr->MinVal;
@ -390,7 +389,7 @@ static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr,
vertical ? rect->right-rect->left : arrowSize, vertical ? rect->right-rect->left : arrowSize,
vertical ? arrowSize : rect->bottom-rect->top, vertical ? arrowSize : rect->bottom-rect->top,
hdcMem, 0, 0, hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL, GetSystemMetrics(SM_CXVSCROLL),GetSystemMetrics(SM_CYHSCROLL),
SRCCOPY ); SRCCOPY );
SelectObject( hdcMem, vertical ? SelectObject( hdcMem, vertical ?
@ -400,13 +399,13 @@ static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr,
StretchBlt( hdc, rect->left, rect->bottom - arrowSize, StretchBlt( hdc, rect->left, rect->bottom - arrowSize,
rect->right - rect->left, arrowSize, rect->right - rect->left, arrowSize,
hdcMem, 0, 0, hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL, GetSystemMetrics(SM_CXVSCROLL),GetSystemMetrics(SM_CYHSCROLL),
SRCCOPY ); SRCCOPY );
else else
StretchBlt( hdc, rect->right - arrowSize, rect->top, StretchBlt( hdc, rect->right - arrowSize, rect->top,
arrowSize, rect->bottom - rect->top, arrowSize, rect->bottom - rect->top,
hdcMem, 0, 0, hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL, GetSystemMetrics(SM_CXVSCROLL), GetSystemMetrics(SM_CYHSCROLL),
SRCCOPY ); SRCCOPY );
SelectObject( hdcMem, hbmpPrev ); SelectObject( hdcMem, hbmpPrev );
DeleteDC( hdcMem ); DeleteDC( hdcMem );
@ -873,23 +872,23 @@ LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
{ {
if (lpCreat->style & SBS_LEFTALIGN) if (lpCreat->style & SBS_LEFTALIGN)
MoveWindow( hwnd, lpCreat->x, lpCreat->y, MoveWindow( hwnd, lpCreat->x, lpCreat->y,
SYSMETRICS_CXVSCROLL+1, lpCreat->cy, FALSE ); GetSystemMetrics(SM_CXVSCROLL)+1, lpCreat->cy, FALSE );
else if (lpCreat->style & SBS_RIGHTALIGN) else if (lpCreat->style & SBS_RIGHTALIGN)
MoveWindow( hwnd, MoveWindow( hwnd,
lpCreat->x+lpCreat->cx-SYSMETRICS_CXVSCROLL-1, lpCreat->x+lpCreat->cx-GetSystemMetrics(SM_CXVSCROLL)-1,
lpCreat->y, lpCreat->y,
SYSMETRICS_CXVSCROLL+1, lpCreat->cy, FALSE ); GetSystemMetrics(SM_CXVSCROLL)+1, lpCreat->cy, FALSE );
} }
else /* SBS_HORZ */ else /* SBS_HORZ */
{ {
if (lpCreat->style & SBS_TOPALIGN) if (lpCreat->style & SBS_TOPALIGN)
MoveWindow( hwnd, lpCreat->x, lpCreat->y, MoveWindow( hwnd, lpCreat->x, lpCreat->y,
lpCreat->cx, SYSMETRICS_CYHSCROLL+1, FALSE ); lpCreat->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
else if (lpCreat->style & SBS_BOTTOMALIGN) else if (lpCreat->style & SBS_BOTTOMALIGN)
MoveWindow( hwnd, MoveWindow( hwnd,
lpCreat->x, lpCreat->x,
lpCreat->y+lpCreat->cy-SYSMETRICS_CYHSCROLL-1, lpCreat->y+lpCreat->cy-GetSystemMetrics(SM_CYHSCROLL)-1,
lpCreat->cx, SYSMETRICS_CYHSCROLL+1, FALSE ); lpCreat->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
} }
} }
if (!hUpArrow) SCROLL_LoadBitmaps(); if (!hUpArrow) SCROLL_LoadBitmaps();

View File

@ -13,7 +13,6 @@
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "ldt.h" #include "ldt.h"
#include "heap.h" #include "heap.h"
#include "message.h"
#include "commdlg.h" #include "commdlg.h"
#include "resource.h" #include "resource.h"
#include "dialog.h" #include "dialog.h"

View File

@ -11,7 +11,6 @@
#include "winbase.h" #include "winbase.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "ldt.h" #include "ldt.h"
#include "message.h"
#include "commdlg.h" #include "commdlg.h"
#include "resource.h" #include "resource.h"
#include "dialog.h" #include "dialog.h"

View File

@ -13,7 +13,6 @@
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "ldt.h" #include "ldt.h"
#include "heap.h" #include "heap.h"
#include "message.h"
#include "commdlg.h" #include "commdlg.h"
#include "resource.h" #include "resource.h"
#include "dialog.h" #include "dialog.h"

View File

@ -13,7 +13,6 @@
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "ldt.h" #include "ldt.h"
#include "message.h"
#include "commdlg.h" #include "commdlg.h"
#include "resource.h" #include "resource.h"
#include "dialog.h" #include "dialog.h"

View File

@ -3,6 +3,9 @@
* *
*/ */
#include <string.h> #include <string.h>
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "neexe.h" #include "neexe.h"
@ -10,12 +13,9 @@
#include "module.h" #include "module.h"
#include "heap.h" #include "heap.h"
#include "debug.h" #include "debug.h"
#include "sysmetrics.h"
#include "winversion.h" #include "winversion.h"
#include "shellapi.h" #include "shellapi.h"
#include "shlobj.h"
#include "pidl.h" #include "pidl.h"
#include "shell32_main.h" #include "shell32_main.h"
@ -276,7 +276,7 @@ HGLOBAL WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON * RetPtr, UINT nI
if( lpiID == NULL ) /* *.ico */ if( lpiID == NULL ) /* *.ico */
pCIDir = SHELL_LoadResource( hFile, pIconDir + i, *(WORD*)pData, &uSize ); pCIDir = SHELL_LoadResource( hFile, pIconDir + i, *(WORD*)pData, &uSize );
RetPtr[i-nIconIndex] = pLookupIconIdFromDirectoryEx( pCIDir, TRUE, SYSMETRICS_CXICON, SYSMETRICS_CYICON, 0); RetPtr[i-nIconIndex] = pLookupIconIdFromDirectoryEx( pCIDir, TRUE, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0);
HeapFree(GetProcessHeap(), 0, pCIDir); HeapFree(GetProcessHeap(), 0, pCIDir);
} }

View File

@ -7,137 +7,7 @@
#ifndef __WINE_SYSMETRICS_H #ifndef __WINE_SYSMETRICS_H
#define __WINE_SYSMETRICS_H #define __WINE_SYSMETRICS_H
#include "wingdi.h"
/* Constant system metrics */
#if 0
#ifdef WIN_95_LOOK
#define SYSMETRICS_CXDLGFRAME 3
#define SYSMETRICS_CYDLGFRAME 3
#define SYSMETRICS_CYVTHUMB 13
#define SYSMETRICS_CXHTHUMB 13
#else
#define SYSMETRICS_CXDLGFRAME 4
#define SYSMETRICS_CYDLGFRAME 4
#define SYSMETRICS_CYVTHUMB 16
#define SYSMETRICS_CXHTHUMB 16
#endif
#define SYSMETRICS_CXICON 32
#define SYSMETRICS_CYICON 32
#define SYSMETRICS_CXCURSOR 32
#define SYSMETRICS_CYCURSOR 32
#ifdef WIN_95_LOOK
#define SYSMETRICS_CYVSCROLL 14
#define SYSMETRICS_CXHSCROLL 14
#define SYSMETRICS_CXMIN 112
#define SYSMETRICS_CYMIN 27
#else
#define SYSMETRICS_CYVSCROLL 16
#define SYSMETRICS_CXHSCROLL 16
#define SYSMETRICS_CXMIN 100
#define SYSMETRICS_CYMIN 28
#endif
#ifdef WIN_95_LOOK
#define SYSMETRICS_CXMINTRACK 112
#define SYSMETRICS_CYMINTRACK 27
#else
#define SYSMETRICS_CXMINTRACK 100
#define SYSMETRICS_CYMINTRACK 28
#endif
#endif /* 0 */
/* Some non-constant system metrics */
#define SYSMETRICS_CXSCREEN sysMetrics[SM_CXSCREEN] /* 0 */
#define SYSMETRICS_CYSCREEN sysMetrics[SM_CYSCREEN] /* 1 */
#define SYSMETRICS_CXVSCROLL sysMetrics[SM_CXVSCROLL] /* 2 */
#define SYSMETRICS_CYHSCROLL sysMetrics[SM_CYHSCROLL] /* 3 */
#define SYSMETRICS_CYCAPTION sysMetrics[SM_CYCAPTION] /* 4 */
#define SYSMETRICS_CXBORDER sysMetrics[SM_CXBORDER] /* 5 */
#define SYSMETRICS_CYBORDER sysMetrics[SM_CYBORDER] /* 6 */
#define SYSMETRICS_CXDLGFRAME sysMetrics[SM_CXDLGFRAME] /* 7 */
#define SYSMETRICS_CYDLGFRAME sysMetrics[SM_CYDLGFRAME] /* 8 */
#define SYSMETRICS_CYVTHUMB sysMetrics[SM_CYVTHUMB] /* 9 */
#define SYSMETRICS_CXHTHUMB sysMetrics[SM_CXHTHUMB] /* 10 */
#define SYSMETRICS_CXICON sysMetrics[SM_CXICON] /* 11 */
#define SYSMETRICS_CYICON sysMetrics[SM_CYICON] /* 12 */
#define SYSMETRICS_CXCURSOR sysMetrics[SM_CXCURSOR] /* 13 */
#define SYSMETRICS_CYCURSOR sysMetrics[SM_CYCURSOR] /* 14 */
#define SYSMETRICS_CYMENU sysMetrics[SM_CYMENU] /* 15 */
#define SYSMETRICS_CXFULLSCREEN sysMetrics[SM_CXFULLSCREEN] /* 16 */
#define SYSMETRICS_CYFULLSCREEN sysMetrics[SM_CYFULLSCREEN] /* 17 */
#define SYSMETRICS_CYKANJIWINDOW sysMetrics[SM_CYKANJIWINDOW] /* 18 */
#define SYSMETRICS_MOUSEPRESENT sysMetrics[SM_MOUSEPRESENT] /* 19 */
#define SYSMETRICS_CYVSCROLL sysMetrics[SM_CYVSCROLL] /* 20 */
#define SYSMETRICS_CXHSCROLL sysMetrics[SM_CXHSCROLL] /* 21 */
#define SYSMETRICS_DEBUG sysMetrics[SM_DEBUG] /* 22 */
#define SYSMETRICS_SWAPBUTTON sysMetrics[SM_SWAPBUTTON] /* 23 */
#define SYSMETRICS_RESERVED1 sysMetrics[SM_RESERVED1] /* 24 */
#define SYSMETRICS_RESERVED2 sysMetrics[SM_RESERVED2] /* 25 */
#define SYSMETRICS_RESERVED3 sysMetrics[SM_RESERVED3] /* 26 */
#define SYSMETRICS_RESERVED4 sysMetrics[SM_RESERVED4] /* 27 */
#define SYSMETRICS_CXMIN sysMetrics[SM_CXMIN] /* 28 */
#define SYSMETRICS_CYMIN sysMetrics[SM_CYMIN] /* 29 */
#define SYSMETRICS_CXSIZE sysMetrics[SM_CXSIZE] /* 30 */
#define SYSMETRICS_CYSIZE sysMetrics[SM_CYSIZE] /* 31 */
#define SYSMETRICS_CXFRAME sysMetrics[SM_CXFRAME] /* 32 */
#define SYSMETRICS_CYFRAME sysMetrics[SM_CYFRAME] /* 33 */
#define SYSMETRICS_CXMINTRACK sysMetrics[SM_CXMINTRACK] /* 34 */
#define SYSMETRICS_CYMINTRACK sysMetrics[SM_CYMINTRACK] /* 35 */
#define SYSMETRICS_CXDOUBLECLK sysMetrics[SM_CXDOUBLECLK] /* 36 */
#define SYSMETRICS_CYDOUBLECLK sysMetrics[SM_CYDOUBLECLK] /* 37 */
#define SYSMETRICS_CXICONSPACING sysMetrics[SM_CXICONSPACING] /* 38 */
#define SYSMETRICS_CYICONSPACING sysMetrics[SM_CYICONSPACING] /* 39 */
#define SYSMETRICS_MENUDROPALIGNMENT sysMetrics[SM_MENUDROPALIGNMENT] /* 40 */
#define SYSMETRICS_PENWINDOWS sysMetrics[SM_PENWINDOWS] /* 41 */
#define SYSMETRICS_DBCSENABLED sysMetrics[SM_DBCSENABLED] /* 42 */
#define SYSMETRICS_CMOUSEBUTTONS sysMetrics[SM_CMOUSEBUTTONS] /* 43 */
#define SYSMETRICS_CXFIXEDFRAME sysMetrics[SM_CXDLGFRAME] /* win40 name change */
#define SYSMETRICS_CYFIXEDFRAME sysMetrics[SM_CYDLGFRAME] /* win40 name change */
#define SYSMETRICS_CXSIZEFRAME sysMetrics[SM_CXFRAME] /* win40 name change */
#define SYSMETRICS_CYSIZEFRAME sysMetrics[SM_CYFRAME] /* win40 name change */
#define SYSMETRICS_SECURE sysMetrics[SM_SECURE] /* 44 */
#define SYSMETRICS_CXEDGE sysMetrics[SM_CXEDGE] /* 45 */
#define SYSMETRICS_CYEDGE sysMetrics[SM_CYEDGE] /* 46 */
#define SYSMETRICS_CXMINSPACING sysMetrics[SM_CXMINSPACING] /* 47 */
#define SYSMETRICS_CYMINSPACING sysMetrics[SM_CYMINSPACING] /* 48 */
#define SYSMETRICS_CXSMICON sysMetrics[SM_CXSMICON] /* 49 */
#define SYSMETRICS_CYSMICON sysMetrics[SM_CYSMICON] /* 50 */
#define SYSMETRICS_CYSMCAPTION sysMetrics[SM_CYSMCAPTION] /* 51 */
#define SYSMETRICS_CXSMSIZE sysMetrics[SM_CXSMSIZE] /* 52 */
#define SYSMETRICS_CYSMSIZE sysMetrics[SM_CYSMSIZE] /* 53 */
#define SYSMETRICS_CXMENUSIZE sysMetrics[SM_CXMENUSIZE] /* 54 */
#define SYSMETRICS_CYMENUSIZE sysMetrics[SM_CYMENUSIZE] /* 55 */
#define SYSMETRICS_ARRANGE sysMetrics[SM_ARRANGE] /* 56 */
#define SYSMETRICS_CXMINIMIZED sysMetrics[SM_CXMINIMIZED] /* 57 */
#define SYSMETRICS_CYMINIMIZED sysMetrics[SM_CYMINIMIZED] /* 58 */
#define SYSMETRICS_CXMAXTRACK sysMetrics[SM_CXMAXTRACK] /* 59 */
#define SYSMETRICS_CYMAXTRACK sysMetrics[SM_CYMAXTRACK] /* 60 */
#define SYSMETRICS_CXMAXIMIZED sysMetrics[SM_CXMAXIMIZED] /* 61 */
#define SYSMETRICS_CYMAXIMIZED sysMetrics[SM_CYMAXIMIZED] /* 62 */
#define SYSMETRICS_NETWORK sysMetrics[SM_NETWORK] /* 63 */
#define SYSMETRICS_CLEANBOOT sysMetrics[SM_CLEANBOOT] /* 67 */
#define SYSMETRICS_CXDRAG sysMetrics[SM_CXDRAG] /* 68 */
#define SYSMETRICS_CYDRAG sysMetrics[SM_CYDRAG] /* 69 */
#define SYSMETRICS_SHOWSOUNDS sysMetrics[SM_SHOWSOUNDS] /* 70 */
/* Use the following instead of sysMetrics[SM_CXMENUCHECK] GetMenuCheckMarkDimensions()! */
#define SYSMETRICS_CXMENUCHECK sysMetrics[SM_CXMENUCHECK] /* 71 */
#define SYSMETRICS_CYMENUCHECK sysMetrics[SM_CYMENUCHECK] /* 72 */
#define SYSMETRICS_SLOWMACHINE sysMetrics[SM_SLOWMACHINE] /* 73 */
#define SYSMETRICS_MIDEASTENABLED sysMetrics[SM_MIDEASTENABLED] /* 74 */
#define SYSMETRICS_MOUSEWHEELPRESENT sysMetrics[SM_MOUSEWHEELPRESENT] /* 75 */
#define SYSMETRICS_CXVIRTUALSCREEN sysMetrics[SM_CXVIRTUALSCREEN] /* 77 */
#define SYSMETRICS_CYVIRTUALSCREEN sysMetrics[SM_CYVIRTUALSCREEN] /* 77 */
#define SYSMETRICS_YVIRTUALSCREEN sysMetrics[SM_YVIRTUALSCREEN] /* 78 */
#define SYSMETRICS_XVIRTUALSCREEN sysMetrics[SM_XVIRTUALSCREEN] /* 79 */
#define SYSMETRICS_CMONITORS sysMetrics[SM_CMONITORS] /* 81 */
#define SYSMETRICS_SAMEDISPLAYFORMAT sysMetrics[SM_SAMEDISPLAYFORMAT] /* 82 */
extern void SYSMETRICS_Init(void); /* sysmetrics.c */ extern void SYSMETRICS_Init(void); /* sysmetrics.c */
extern short sysMetrics[SM_CMETRICS+1];
extern void SYSCOLOR_Init(void); /* syscolor.c */ extern void SYSCOLOR_Init(void); /* syscolor.c */
#endif /* __WINE_SYSMETRICS_H */ #endif /* __WINE_SYSMETRICS_H */

View File

@ -19,7 +19,6 @@
#include "neexe.h" #include "neexe.h"
#include "dlgs.h" #include "dlgs.h"
#include "cursoricon.h" #include "cursoricon.h"
#include "sysmetrics.h"
#include "shellapi.h" #include "shellapi.h"
#include "shlobj.h" #include "shlobj.h"
#include "debugtools.h" #include "debugtools.h"
@ -829,7 +828,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
/* found */ /* found */
cid = (CURSORICONDIR*)igdata; cid = (CURSORICONDIR*)igdata;
cids[i] = cid; cids[i] = cid;
RetPtr[i] = LookupIconIdFromDirectoryEx(igdata,TRUE,SYSMETRICS_CXICON,SYSMETRICS_CYICON,0); RetPtr[i] = LookupIconIdFromDirectoryEx(igdata,TRUE,GetSystemMetrics(SM_CXICON),GetSystemMetrics(SM_CYICON),0);
} }
iconresdir=GetResDirEntryW(rootresdir,RT_ICONW,(DWORD)rootresdir,FALSE); iconresdir=GetResDirEntryW(rootresdir,RT_ICONW,(DWORD)rootresdir,FALSE);
@ -859,7 +858,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
RetPtr[i]=0; RetPtr[i]=0;
continue; continue;
} }
RetPtr[i] = CreateIconFromResourceEx(idata,idataent->Size,TRUE,0x00030000,SYSMETRICS_CXICON,SYSMETRICS_CYICON,0); RetPtr[i] = CreateIconFromResourceEx(idata,idataent->Size,TRUE,0x00030000,GetSystemMetrics(SM_CXICON),GetSystemMetrics(SM_CYICON),0);
} }
goto end_3; /* sucess */ goto end_3; /* sucess */
} }

View File

@ -14,7 +14,6 @@
#include "bitmap.h" #include "bitmap.h"
#include "heap.h" #include "heap.h"
#include "global.h" #include "global.h"
#include "sysmetrics.h"
#include "cursoricon.h" #include "cursoricon.h"
#include "debugtools.h" #include "debugtools.h"
#include "monitor.h" #include "monitor.h"
@ -428,11 +427,11 @@ HANDLE WINAPI LoadImageW( HINSTANCE hinst, LPCWSTR name, UINT type,
} }
if (loadflags & LR_DEFAULTSIZE) { if (loadflags & LR_DEFAULTSIZE) {
if (type == IMAGE_ICON) { if (type == IMAGE_ICON) {
if (!desiredx) desiredx = SYSMETRICS_CXICON; if (!desiredx) desiredx = GetSystemMetrics(SM_CXICON);
if (!desiredy) desiredy = SYSMETRICS_CYICON; if (!desiredy) desiredy = GetSystemMetrics(SM_CYICON);
} else if (type == IMAGE_CURSOR) { } else if (type == IMAGE_CURSOR) {
if (!desiredx) desiredx = SYSMETRICS_CXCURSOR; if (!desiredx) desiredx = GetSystemMetrics(SM_CXCURSOR);
if (!desiredy) desiredy = SYSMETRICS_CYCURSOR; if (!desiredy) desiredy = GetSystemMetrics(SM_CYCURSOR);
} }
} }
if (loadflags & LR_LOADFROMFILE) loadflags &= ~LR_SHARED; if (loadflags & LR_LOADFROMFILE) loadflags &= ~LR_SHARED;

View File

@ -40,7 +40,6 @@
#include "cursoricon.h" #include "cursoricon.h"
#include "dc.h" #include "dc.h"
#include "gdi.h" #include "gdi.h"
#include "sysmetrics.h"
#include "global.h" #include "global.h"
#include "module.h" #include "module.h"
#include "debugtools.h" #include "debugtools.h"
@ -885,7 +884,8 @@ HCURSOR16 CURSORICON_IconToCursor(HICON16 hIcon, BOOL bSemiTransparent)
if( !hRet ) /* fall back on default drag cursor */ if( !hRet ) /* fall back on default drag cursor */
hRet = CURSORICON_Copy( pTask->hInstance , hRet = CURSORICON_Copy( pTask->hInstance ,
CURSORICON_Load(0,MAKEINTRESOURCEW(OCR_DRAGOBJECT), CURSORICON_Load(0,MAKEINTRESOURCEW(OCR_DRAGOBJECT),
SYSMETRICS_CXCURSOR, SYSMETRICS_CYCURSOR, 1, TRUE, 0) ); GetSystemMetrics(SM_CXCURSOR),
GetSystemMetrics(SM_CYCURSOR), 1, TRUE, 0) );
} }
return hRet; return hRet;
@ -1454,8 +1454,8 @@ INT WINAPI LookupIconIdFromDirectoryEx( LPBYTE dir, BOOL bIcon,
INT16 WINAPI LookupIconIdFromDirectory16( LPBYTE dir, BOOL16 bIcon ) INT16 WINAPI LookupIconIdFromDirectory16( LPBYTE dir, BOOL16 bIcon )
{ {
return LookupIconIdFromDirectoryEx16( dir, bIcon, return LookupIconIdFromDirectoryEx16( dir, bIcon,
bIcon ? SYSMETRICS_CXICON : SYSMETRICS_CXCURSOR, bIcon ? GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXCURSOR),
bIcon ? SYSMETRICS_CYICON : SYSMETRICS_CYCURSOR, bIcon ? 0 : LR_MONOCHROME ); bIcon ? GetSystemMetrics(SM_CYICON) : GetSystemMetrics(SM_CYCURSOR), bIcon ? 0 : LR_MONOCHROME );
} }
/********************************************************************** /**********************************************************************
@ -1464,8 +1464,8 @@ INT16 WINAPI LookupIconIdFromDirectory16( LPBYTE dir, BOOL16 bIcon )
INT WINAPI LookupIconIdFromDirectory( LPBYTE dir, BOOL bIcon ) INT WINAPI LookupIconIdFromDirectory( LPBYTE dir, BOOL bIcon )
{ {
return LookupIconIdFromDirectoryEx( dir, bIcon, return LookupIconIdFromDirectoryEx( dir, bIcon,
bIcon ? SYSMETRICS_CXICON : SYSMETRICS_CXCURSOR, bIcon ? GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXCURSOR),
bIcon ? SYSMETRICS_CYICON : SYSMETRICS_CYCURSOR, bIcon ? 0 : LR_MONOCHROME ); bIcon ? GetSystemMetrics(SM_CYICON) : GetSystemMetrics(SM_CYCURSOR), bIcon ? 0 : LR_MONOCHROME );
} }
/********************************************************************** /**********************************************************************
@ -1482,10 +1482,10 @@ WORD WINAPI GetIconID16( HGLOBAL16 hResource, DWORD resType )
{ {
case RT_CURSOR16: case RT_CURSOR16:
return (WORD)LookupIconIdFromDirectoryEx16( lpDir, FALSE, return (WORD)LookupIconIdFromDirectoryEx16( lpDir, FALSE,
SYSMETRICS_CXCURSOR, SYSMETRICS_CYCURSOR, LR_MONOCHROME ); GetSystemMetrics(SM_CXCURSOR), GetSystemMetrics(SM_CYCURSOR), LR_MONOCHROME );
case RT_ICON16: case RT_ICON16:
return (WORD)LookupIconIdFromDirectoryEx16( lpDir, TRUE, return (WORD)LookupIconIdFromDirectoryEx16( lpDir, TRUE,
SYSMETRICS_CXICON, SYSMETRICS_CYICON, 0 ); GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0 );
default: default:
WARN_(cursor)("invalid res type %ld\n", resType ); WARN_(cursor)("invalid res type %ld\n", resType );
} }
@ -1524,7 +1524,7 @@ HGLOBAL16 WINAPI LoadDIBIconHandler16( HGLOBAL16 hMemObj, HMODULE16 hModule, HRS
LPBYTE bits = (LPBYTE)GlobalLock16( hMemObj ); LPBYTE bits = (LPBYTE)GlobalLock16( hMemObj );
hMemObj = CURSORICON_CreateFromResource( hModule, hMemObj, bits, hMemObj = CURSORICON_CreateFromResource( hModule, hMemObj, bits,
SizeofResource16(hModule, hRsrc), TRUE, 0x00030000, SizeofResource16(hModule, hRsrc), TRUE, 0x00030000,
SYSMETRICS_CXICON, SYSMETRICS_CYICON, LR_DEFAULTCOLOR ); GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR );
} }
return hMemObj; return hMemObj;
} }
@ -1542,7 +1542,7 @@ HGLOBAL16 WINAPI LoadDIBCursorHandler16( HGLOBAL16 hMemObj, HMODULE16 hModule, H
LPBYTE bits = (LPBYTE)GlobalLock16( hMemObj ); LPBYTE bits = (LPBYTE)GlobalLock16( hMemObj );
hMemObj = CURSORICON_CreateFromResource( hModule, hMemObj, bits, hMemObj = CURSORICON_CreateFromResource( hModule, hMemObj, bits,
SizeofResource16(hModule, hRsrc), FALSE, 0x00030000, SizeofResource16(hModule, hRsrc), FALSE, 0x00030000,
SYSMETRICS_CXCURSOR, SYSMETRICS_CYCURSOR, LR_MONOCHROME ); GetSystemMetrics(SM_CXCURSOR), GetSystemMetrics(SM_CYCURSOR), LR_MONOCHROME );
} }
return hMemObj; return hMemObj;
} }

View File

@ -26,7 +26,6 @@
#include "gdi.h" #include "gdi.h"
#include "region.h" #include "region.h"
#include "heap.h" #include "heap.h"
#include "sysmetrics.h"
#include "local.h" #include "local.h"
#include "debug.h" #include "debug.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
@ -828,7 +827,7 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
} }
else else
if ((hwnd == GetDesktopWindow()) && !DESKTOP_IsSingleWindow()) if ((hwnd == GetDesktopWindow()) && !DESKTOP_IsSingleWindow())
hrgnVisible = CreateRectRgn( 0, 0, SYSMETRICS_CXSCREEN, SYSMETRICS_CYSCREEN ); hrgnVisible = CreateRectRgn( 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN) );
else else
{ {
hrgnVisible = DCE_GetVisRgn( hwnd, flags, 0, 0 ); hrgnVisible = DCE_GetVisRgn( hwnd, flags, 0, 0 );

View File

@ -13,7 +13,6 @@
#include "nonclient.h" #include "nonclient.h"
#include "winpos.h" #include "winpos.h"
#include "dce.h" #include "dce.h"
#include "sysmetrics.h"
#include "debug.h" #include "debug.h"
#include "spy.h" #include "spy.h"
#include "tweak.h" #include "tweak.h"
@ -240,9 +239,9 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam,
if( (wndPtr->dwStyle & WS_MINIMIZE) && wndPtr->class->hIcon ) if( (wndPtr->dwStyle & WS_MINIMIZE) && wndPtr->class->hIcon )
{ {
int x = (wndPtr->rectWindow.right - wndPtr->rectWindow.left - int x = (wndPtr->rectWindow.right - wndPtr->rectWindow.left -
SYSMETRICS_CXICON)/2; GetSystemMetrics(SM_CXICON))/2;
int y = (wndPtr->rectWindow.bottom - wndPtr->rectWindow.top - int y = (wndPtr->rectWindow.bottom - wndPtr->rectWindow.top -
SYSMETRICS_CYICON)/2; GetSystemMetrics(SM_CYICON))/2;
TRACE(win,"Painting class icon: vis rect=(%i,%i - %i,%i)\n", TRACE(win,"Painting class icon: vis rect=(%i,%i - %i,%i)\n",
ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom ); ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom );
DrawIcon( hdc, x, y, wndPtr->class->hIcon ); DrawIcon( hdc, x, y, wndPtr->class->hIcon );

View File

@ -20,7 +20,6 @@
#include "user.h" #include "user.h"
#include "winproc.h" #include "winproc.h"
#include "message.h" #include "message.h"
#include "sysmetrics.h"
#include "debug.h" #include "debug.h"
DEFAULT_DEBUG_CHANNEL(dialog) DEFAULT_DEBUG_CHANNEL(dialog)
@ -628,8 +627,8 @@ HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
{ {
if (template.style & DS_CENTER) if (template.style & DS_CENTER)
{ {
rect.left = (SYSMETRICS_CXSCREEN - rect.right) / 2; rect.left = (GetSystemMetrics(SM_CXSCREEN) - rect.right) / 2;
rect.top = (SYSMETRICS_CYSCREEN - rect.bottom) / 2; rect.top = (GetSystemMetrics(SM_CYSCREEN) - rect.bottom) / 2;
} }
else else
{ {
@ -645,10 +644,10 @@ HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
/* try to fit it into the desktop */ /* try to fit it into the desktop */
if( (dX = rect.left + rect.right + SYSMETRICS_CXDLGFRAME if( (dX = rect.left + rect.right + GetSystemMetrics(SM_CXDLGFRAME)
- SYSMETRICS_CXSCREEN) > 0 ) rect.left -= dX; - GetSystemMetrics(SM_CXSCREEN)) > 0 ) rect.left -= dX;
if( (dY = rect.top + rect.bottom + SYSMETRICS_CYDLGFRAME if( (dY = rect.top + rect.bottom + GetSystemMetrics(SM_CYDLGFRAME)
- SYSMETRICS_CYSCREEN) > 0 ) rect.top -= dY; - GetSystemMetrics(SM_CYSCREEN)) > 0 ) rect.top -= dY;
if( rect.left < 0 ) rect.left = 0; if( rect.left < 0 ) rect.left = 0;
if( rect.top < 0 ) rect.top = 0; if( rect.top < 0 ) rect.top = 0;
} }

View File

@ -32,7 +32,6 @@
#include "message.h" #include "message.h"
#include "display.h" #include "display.h"
#include "mouse.h" #include "mouse.h"
#include "sysmetrics.h"
DEFAULT_DEBUG_CHANNEL(dinput) DEFAULT_DEBUG_CHANNEL(dinput)
@ -797,8 +796,8 @@ static void WINAPI dinput_mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
extra = (DWORD)wme->hWnd; extra = (DWORD)wme->hWnd;
assert( dwFlags & MOUSEEVENTF_ABSOLUTE ); assert( dwFlags & MOUSEEVENTF_ABSOLUTE );
posX = (dx * SYSMETRICS_CXSCREEN) >> 16; posX = (dx * GetSystemMetrics(SM_CXSCREEN)) >> 16;
posY = (dy * SYSMETRICS_CYSCREEN) >> 16; posY = (dy * GetSystemMetrics(SM_CYSCREEN)) >> 16;
} else { } else {
ERR(dinput, "Mouse event not supported...\n"); ERR(dinput, "Mouse event not supported...\n");
return ; return ;

View File

@ -24,8 +24,6 @@
#include "keyboard.h" #include "keyboard.h"
#include "mouse.h" #include "mouse.h"
#include "message.h" #include "message.h"
#include "sysmetrics.h"
#include "debugtools.h"
#include "debugtools.h" #include "debugtools.h"
#include "struct32.h" #include "struct32.h"
#include "winerror.h" #include "winerror.h"
@ -169,8 +167,8 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
extra = (DWORD)wme->hWnd; extra = (DWORD)wme->hWnd;
assert( dwFlags & MOUSEEVENTF_ABSOLUTE ); assert( dwFlags & MOUSEEVENTF_ABSOLUTE );
posX = (dx * SYSMETRICS_CXSCREEN) >> 16; posX = (dx * GetSystemMetrics(SM_CXSCREEN)) >> 16;
posY = (dy * SYSMETRICS_CYSCREEN) >> 16; posY = (dy * GetSystemMetrics(SM_CYSCREEN)) >> 16;
} }
else else
{ {
@ -184,8 +182,8 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
{ {
if ( dwFlags & MOUSEEVENTF_ABSOLUTE ) if ( dwFlags & MOUSEEVENTF_ABSOLUTE )
{ {
posX = (dx * SYSMETRICS_CXSCREEN) >> 16; posX = (dx * GetSystemMetrics(SM_CXSCREEN)) >> 16;
posY = (dy * SYSMETRICS_CYSCREEN) >> 16; posY = (dy * GetSystemMetrics(SM_CYSCREEN)) >> 16;
} }
else else
{ {

View File

@ -24,7 +24,6 @@
#include "menu.h" #include "menu.h"
#include "resource.h" #include "resource.h"
#include "struct32.h" #include "struct32.h"
#include "sysmetrics.h"
#include "tweak.h" #include "tweak.h"
#include "debug.h" #include "debug.h"
@ -654,11 +653,11 @@ static HBITMAP16 CreateMDIMenuBitmap(void)
HANDLE16 hobjSrc, hobjDest; HANDLE16 hobjSrc, hobjDest;
hobjSrc = SelectObject(hDCSrc, hbClose); hobjSrc = SelectObject(hDCSrc, hbClose);
hbCopy = CreateCompatibleBitmap(hDCSrc,SYSMETRICS_CXSIZE,SYSMETRICS_CYSIZE); hbCopy = CreateCompatibleBitmap(hDCSrc,GetSystemMetrics(SM_CXSIZE),GetSystemMetrics(SM_CYSIZE));
hobjDest = SelectObject(hDCDest, hbCopy); hobjDest = SelectObject(hDCDest, hbCopy);
BitBlt(hDCDest, 0, 0, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE, BitBlt(hDCDest, 0, 0, GetSystemMetrics(SM_CXSIZE), GetSystemMetrics(SM_CYSIZE),
hDCSrc, SYSMETRICS_CXSIZE, 0, SRCCOPY); hDCSrc, GetSystemMetrics(SM_CXSIZE), 0, SRCCOPY);
SelectObject(hDCSrc, hobjSrc); SelectObject(hDCSrc, hobjSrc);
DeleteObject(hbClose); DeleteObject(hbClose);
@ -666,8 +665,8 @@ static HBITMAP16 CreateMDIMenuBitmap(void)
hobjSrc = SelectObject( hDCDest, GetStockObject(BLACK_PEN) ); hobjSrc = SelectObject( hDCDest, GetStockObject(BLACK_PEN) );
MoveToEx( hDCDest, SYSMETRICS_CXSIZE - 1, 0, NULL ); MoveToEx( hDCDest, GetSystemMetrics(SM_CXSIZE) - 1, 0, NULL );
LineTo( hDCDest, SYSMETRICS_CXSIZE - 1, SYSMETRICS_CYSIZE - 1); LineTo( hDCDest, GetSystemMetrics(SM_CXSIZE) - 1, GetSystemMetrics(SM_CYSIZE) - 1);
SelectObject(hDCDest, hobjSrc ); SelectObject(hDCDest, hobjSrc );
SelectObject(hDCDest, hobjDest); SelectObject(hDCDest, hobjDest);
@ -699,7 +698,8 @@ static LONG MDICascade(WND* clientWnd, MDICLIENTINFO *ci)
INT delta = 0, n = 0; INT delta = 0, n = 0;
POINT pos[2]; POINT pos[2];
if( total < ci->nActiveChildren ) if( total < ci->nActiveChildren )
delta = SYSMETRICS_CYICONSPACING + SYSMETRICS_CYICON; delta = GetSystemMetrics(SM_CYICONSPACING) +
GetSystemMetrics(SM_CYICON);
/* walk the list (backwards) and move windows */ /* walk the list (backwards) and move windows */
while (*ppWnd) ppWnd++; while (*ppWnd) ppWnd++;
@ -765,8 +765,8 @@ static void MDITile( WND* wndClient, MDICLIENTINFO *ci, WPARAM wParam )
if( total != ci->nActiveChildren) if( total != ci->nActiveChildren)
{ {
y = rect.bottom - 2 * SYSMETRICS_CYICONSPACING - SYSMETRICS_CYICON; y = rect.bottom - 2 * GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON);
rect.bottom = ( y - SYSMETRICS_CYICON < rect.top )? rect.bottom: y; rect.bottom = ( y - GetSystemMetrics(SM_CYICON) < rect.top )? rect.bottom: y;
} }
ysize = rect.bottom / rows; ysize = rect.bottom / rows;
@ -1965,14 +1965,14 @@ void WINAPI ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam,
GetScrollRange(hWnd,SB_HORZ,&minPos,&maxPos); GetScrollRange(hWnd,SB_HORZ,&minPos,&maxPos);
curPos = GetScrollPos(hWnd,SB_HORZ); curPos = GetScrollPos(hWnd,SB_HORZ);
length = (wndPtr->rectClient.right - wndPtr->rectClient.left)/2; length = (wndPtr->rectClient.right - wndPtr->rectClient.left)/2;
shift = SYSMETRICS_CYHSCROLL; shift = GetSystemMetrics(SM_CYHSCROLL);
} }
else if( uMsg == WM_VSCROLL ) else if( uMsg == WM_VSCROLL )
{ {
GetScrollRange(hWnd,SB_VERT,&minPos,&maxPos); GetScrollRange(hWnd,SB_VERT,&minPos,&maxPos);
curPos = GetScrollPos(hWnd,SB_VERT); curPos = GetScrollPos(hWnd,SB_VERT);
length = (wndPtr->rectClient.bottom - wndPtr->rectClient.top)/2; length = (wndPtr->rectClient.bottom - wndPtr->rectClient.top)/2;
shift = SYSMETRICS_CXVSCROLL; shift = GetSystemMetrics(SM_CXVSCROLL);
} }
else else
{ {

View File

@ -14,7 +14,6 @@
#include "message.h" #include "message.h"
#include "winerror.h" #include "winerror.h"
#include "win.h" #include "win.h"
#include "sysmetrics.h"
#include "heap.h" #include "heap.h"
#include "hook.h" #include "hook.h"
#include "input.h" #include "input.h"
@ -185,8 +184,8 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
{ {
if ((message == clk_message) && (hWnd == clk_hwnd) && if ((message == clk_message) && (hWnd == clk_hwnd) &&
(msg->time - dblclk_time_limit < doubleClickSpeed) && (msg->time - dblclk_time_limit < doubleClickSpeed) &&
(abs(msg->pt.x - clk_pos.x) < SYSMETRICS_CXDOUBLECLK/2) && (abs(msg->pt.x - clk_pos.x) < GetSystemMetrics(SM_CXDOUBLECLK)/2) &&
(abs(msg->pt.y - clk_pos.y) < SYSMETRICS_CYDOUBLECLK/2)) (abs(msg->pt.y - clk_pos.y) < GetSystemMetrics(SM_CYDOUBLECLK)/2))
{ {
message += (WM_LBUTTONDBLCLK - WM_LBUTTONDOWN); message += (WM_LBUTTONDBLCLK - WM_LBUTTONDOWN);
mouseClick++; /* == 2 */ mouseClick++; /* == 2 */

View File

@ -9,7 +9,6 @@
#include "version.h" #include "version.h"
#include "win.h" #include "win.h"
#include "message.h" #include "message.h"
#include "sysmetrics.h"
#include "user.h" #include "user.h"
#include "heap.h" #include "heap.h"
#include "dce.h" #include "dce.h"
@ -91,28 +90,28 @@ static void NC_AdjustRect( LPRECT16 rect, DWORD style, BOOL menu,
(exStyle & WS_EX_DLGMODALFRAME)))) (exStyle & WS_EX_DLGMODALFRAME))))
{ {
if (HAS_DLGFRAME( style, exStyle )) if (HAS_DLGFRAME( style, exStyle ))
InflateRect16(rect, SYSMETRICS_CXDLGFRAME, SYSMETRICS_CYDLGFRAME ); InflateRect16(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
else else
{ {
if (HAS_THICKFRAME(style)) if (HAS_THICKFRAME(style))
InflateRect16( rect, SYSMETRICS_CXFRAME, SYSMETRICS_CYFRAME ); InflateRect16( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
if (style & WS_BORDER) if (style & WS_BORDER)
InflateRect16( rect, SYSMETRICS_CXBORDER, SYSMETRICS_CYBORDER); InflateRect16( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
} }
if ((style & WS_CAPTION) == WS_CAPTION) if ((style & WS_CAPTION) == WS_CAPTION)
rect->top -= SYSMETRICS_CYCAPTION - SYSMETRICS_CYBORDER; rect->top -= GetSystemMetrics(SM_CYCAPTION) - GetSystemMetrics(SM_CYBORDER);
} }
if (menu) rect->top -= SYSMETRICS_CYMENU + SYSMETRICS_CYBORDER; if (menu) rect->top -= GetSystemMetrics(SM_CYMENU) + GetSystemMetrics(SM_CYBORDER);
if (style & WS_VSCROLL) { if (style & WS_VSCROLL) {
rect->right += SYSMETRICS_CXVSCROLL - 1; rect->right += GetSystemMetrics(SM_CXVSCROLL) - 1;
if(!(style & WS_BORDER)) if(!(style & WS_BORDER))
rect->right++; rect->right++;
} }
if (style & WS_HSCROLL) { if (style & WS_HSCROLL) {
rect->bottom += SYSMETRICS_CYHSCROLL - 1; rect->bottom += GetSystemMetrics(SM_CYHSCROLL) - 1;
if(!(style & WS_BORDER)) if(!(style & WS_BORDER))
rect->bottom++; rect->bottom++;
} }
@ -157,28 +156,28 @@ NC_AdjustRectOuter95 (LPRECT16 rect, DWORD style, BOOL menu, DWORD exStyle)
(exStyle & WS_EX_DLGMODALFRAME)))) (exStyle & WS_EX_DLGMODALFRAME))))
{ {
if (HAS_FIXEDFRAME( style, exStyle )) if (HAS_FIXEDFRAME( style, exStyle ))
InflateRect16(rect, SYSMETRICS_CXDLGFRAME, SYSMETRICS_CYDLGFRAME ); InflateRect16(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
else else
{ {
if (HAS_SIZEFRAME(style)) if (HAS_SIZEFRAME(style))
InflateRect16( rect, SYSMETRICS_CXFRAME, SYSMETRICS_CYFRAME ); InflateRect16( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
#if 0 #if 0
if (style & WS_BORDER) if (style & WS_BORDER)
InflateRect16( rect, SYSMETRICS_CXBORDER, SYSMETRICS_CYBORDER); InflateRect16( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
#endif #endif
} }
if ((style & WS_CAPTION) == WS_CAPTION) if ((style & WS_CAPTION) == WS_CAPTION)
{ {
if (exStyle & WS_EX_TOOLWINDOW) if (exStyle & WS_EX_TOOLWINDOW)
rect->top -= SYSMETRICS_CYSMCAPTION; rect->top -= GetSystemMetrics(SM_CYSMCAPTION);
else else
rect->top -= SYSMETRICS_CYCAPTION; rect->top -= GetSystemMetrics(SM_CYCAPTION);
} }
} }
if (menu) if (menu)
rect->top -= sysMetrics[SM_CYMENU]; rect->top -= GetSystemMetrics(SM_CYMENU);
} }
@ -214,13 +213,13 @@ NC_AdjustRectInner95 (LPRECT16 rect, DWORD style, DWORD exStyle)
if(style & WS_ICONIC) return; if(style & WS_ICONIC) return;
if (exStyle & WS_EX_CLIENTEDGE) if (exStyle & WS_EX_CLIENTEDGE)
InflateRect16 (rect, sysMetrics[SM_CXEDGE], sysMetrics[SM_CYEDGE]); InflateRect16 (rect, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE));
if (exStyle & WS_EX_STATICEDGE) if (exStyle & WS_EX_STATICEDGE)
InflateRect16 (rect, sysMetrics[SM_CXBORDER], sysMetrics[SM_CYBORDER]); InflateRect16 (rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
if (style & WS_VSCROLL) rect->right += SYSMETRICS_CXVSCROLL; if (style & WS_VSCROLL) rect->right += GetSystemMetrics(SM_CXVSCROLL);
if (style & WS_HSCROLL) rect->bottom += SYSMETRICS_CYHSCROLL; if (style & WS_HSCROLL) rect->bottom += GetSystemMetrics(SM_CYHSCROLL);
} }
@ -337,11 +336,11 @@ DrawCaptionTempA (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
POINT pt; POINT pt;
pt.x = rc.left + 2; pt.x = rc.left + 2;
pt.y = (rc.bottom + rc.top - sysMetrics[SM_CYSMICON]) / 2; pt.y = (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2;
if (hIcon) { if (hIcon) {
DrawIconEx (hdc, pt.x, pt.y, hIcon, sysMetrics[SM_CXSMICON], DrawIconEx (hdc, pt.x, pt.y, hIcon, GetSystemMetrics(SM_CXSMICON),
sysMetrics[SM_CYSMICON], 0, 0, DI_NORMAL); GetSystemMetrics(SM_CYSMICON), 0, 0, DI_NORMAL);
} }
else { else {
WND *wndPtr = WIN_FindWndPtr(hwnd); WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -352,8 +351,8 @@ DrawCaptionTempA (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
else if (wndPtr->class->hIcon) else if (wndPtr->class->hIcon)
hAppIcon = wndPtr->class->hIcon; hAppIcon = wndPtr->class->hIcon;
DrawIconEx (hdc, pt.x, pt.y, hAppIcon, sysMetrics[SM_CXSMICON], DrawIconEx (hdc, pt.x, pt.y, hAppIcon, GetSystemMetrics(SM_CXSMICON),
sysMetrics[SM_CYSMICON], 0, 0, DI_NORMAL); GetSystemMetrics(SM_CYSMICON), 0, 0, DI_NORMAL);
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
} }
@ -565,16 +564,16 @@ static void NC_GetInsideRect( HWND hwnd, RECT *rect )
/* Remove frame from rectangle */ /* Remove frame from rectangle */
if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle )) if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
{ {
InflateRect( rect, -SYSMETRICS_CXDLGFRAME, -SYSMETRICS_CYDLGFRAME); InflateRect( rect, -GetSystemMetrics(SM_CXDLGFRAME), -GetSystemMetrics(SM_CYDLGFRAME));
if (wndPtr->dwExStyle & WS_EX_DLGMODALFRAME) if (wndPtr->dwExStyle & WS_EX_DLGMODALFRAME)
InflateRect( rect, -1, 0 ); InflateRect( rect, -1, 0 );
} }
else else
{ {
if (HAS_THICKFRAME( wndPtr->dwStyle )) if (HAS_THICKFRAME( wndPtr->dwStyle ))
InflateRect( rect, -SYSMETRICS_CXFRAME, -SYSMETRICS_CYFRAME ); InflateRect( rect, -GetSystemMetrics(SM_CXFRAME), -GetSystemMetrics(SM_CYFRAME) );
if (wndPtr->dwStyle & WS_BORDER) if (wndPtr->dwStyle & WS_BORDER)
InflateRect( rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER ); InflateRect( rect, -GetSystemMetrics(SM_CXBORDER), -GetSystemMetrics(SM_CYBORDER) );
} }
END: END:
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
@ -604,22 +603,22 @@ NC_GetInsideRect95 (HWND hwnd, RECT *rect)
/* Remove frame from rectangle */ /* Remove frame from rectangle */
if (HAS_FIXEDFRAME (wndPtr->dwStyle, wndPtr->dwExStyle )) if (HAS_FIXEDFRAME (wndPtr->dwStyle, wndPtr->dwExStyle ))
{ {
InflateRect( rect, -SYSMETRICS_CXFIXEDFRAME, -SYSMETRICS_CYFIXEDFRAME); InflateRect( rect, -GetSystemMetrics(SM_CXFIXEDFRAME), -GetSystemMetrics(SM_CYFIXEDFRAME));
} }
else if (HAS_SIZEFRAME (wndPtr->dwStyle)) else if (HAS_SIZEFRAME (wndPtr->dwStyle))
{ {
InflateRect( rect, -SYSMETRICS_CXSIZEFRAME, -SYSMETRICS_CYSIZEFRAME ); InflateRect( rect, -GetSystemMetrics(SM_CXSIZEFRAME), -GetSystemMetrics(SM_CYSIZEFRAME) );
/* if (wndPtr->dwStyle & WS_BORDER) /* if (wndPtr->dwStyle & WS_BORDER)
InflateRect32( rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER );*/ InflateRect32( rect, -GetSystemMetrics(SM_CXBORDER, -GetSystemMetrics(SM_CYBORDER );*/
} }
if (wndPtr->dwStyle & WS_CHILD) { if (wndPtr->dwStyle & WS_CHILD) {
if (wndPtr->dwExStyle & WS_EX_CLIENTEDGE) if (wndPtr->dwExStyle & WS_EX_CLIENTEDGE)
InflateRect (rect, -SYSMETRICS_CXEDGE, -SYSMETRICS_CYEDGE); InflateRect (rect, -GetSystemMetrics(SM_CXEDGE), -GetSystemMetrics(SM_CYEDGE));
if (wndPtr->dwExStyle & WS_EX_STATICEDGE) if (wndPtr->dwExStyle & WS_EX_STATICEDGE)
InflateRect (rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER); InflateRect (rect, -GetSystemMetrics(SM_CXBORDER), -GetSystemMetrics(SM_CYBORDER));
} }
END: END:
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
@ -650,37 +649,37 @@ LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt )
/* Check borders */ /* Check borders */
if (HAS_THICKFRAME( wndPtr->dwStyle )) if (HAS_THICKFRAME( wndPtr->dwStyle ))
{ {
InflateRect16( &rect, -SYSMETRICS_CXFRAME, -SYSMETRICS_CYFRAME ); InflateRect16( &rect, -GetSystemMetrics(SM_CXFRAME), -GetSystemMetrics(SM_CYFRAME) );
if (wndPtr->dwStyle & WS_BORDER) if (wndPtr->dwStyle & WS_BORDER)
InflateRect16(&rect,-SYSMETRICS_CXBORDER,-SYSMETRICS_CYBORDER); InflateRect16(&rect,-GetSystemMetrics(SM_CXBORDER),-GetSystemMetrics(SM_CYBORDER));
if (!PtInRect16( &rect, pt )) if (!PtInRect16( &rect, pt ))
{ {
/* Check top sizing border */ /* Check top sizing border */
if (pt.y < rect.top) if (pt.y < rect.top)
{ {
if (pt.x < rect.left+SYSMETRICS_CXSIZE) return HTTOPLEFT; if (pt.x < rect.left+GetSystemMetrics(SM_CXSIZE)) return HTTOPLEFT;
if (pt.x >= rect.right-SYSMETRICS_CXSIZE) return HTTOPRIGHT; if (pt.x >= rect.right-GetSystemMetrics(SM_CXSIZE)) return HTTOPRIGHT;
return HTTOP; return HTTOP;
} }
/* Check bottom sizing border */ /* Check bottom sizing border */
if (pt.y >= rect.bottom) if (pt.y >= rect.bottom)
{ {
if (pt.x < rect.left+SYSMETRICS_CXSIZE) return HTBOTTOMLEFT; if (pt.x < rect.left+GetSystemMetrics(SM_CXSIZE)) return HTBOTTOMLEFT;
if (pt.x >= rect.right-SYSMETRICS_CXSIZE) return HTBOTTOMRIGHT; if (pt.x >= rect.right-GetSystemMetrics(SM_CXSIZE)) return HTBOTTOMRIGHT;
return HTBOTTOM; return HTBOTTOM;
} }
/* Check left sizing border */ /* Check left sizing border */
if (pt.x < rect.left) if (pt.x < rect.left)
{ {
if (pt.y < rect.top+SYSMETRICS_CYSIZE) return HTTOPLEFT; if (pt.y < rect.top+GetSystemMetrics(SM_CYSIZE)) return HTTOPLEFT;
if (pt.y >= rect.bottom-SYSMETRICS_CYSIZE) return HTBOTTOMLEFT; if (pt.y >= rect.bottom-GetSystemMetrics(SM_CYSIZE)) return HTBOTTOMLEFT;
return HTLEFT; return HTLEFT;
} }
/* Check right sizing border */ /* Check right sizing border */
if (pt.x >= rect.right) if (pt.x >= rect.right)
{ {
if (pt.y < rect.top+SYSMETRICS_CYSIZE) return HTTOPRIGHT; if (pt.y < rect.top+GetSystemMetrics(SM_CYSIZE)) return HTTOPRIGHT;
if (pt.y >= rect.bottom-SYSMETRICS_CYSIZE) return HTBOTTOMRIGHT; if (pt.y >= rect.bottom-GetSystemMetrics(SM_CYSIZE)) return HTBOTTOMRIGHT;
return HTRIGHT; return HTRIGHT;
} }
} }
@ -688,9 +687,9 @@ LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt )
else /* No thick frame */ else /* No thick frame */
{ {
if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle )) if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
InflateRect16(&rect, -SYSMETRICS_CXDLGFRAME, -SYSMETRICS_CYDLGFRAME); InflateRect16(&rect, -GetSystemMetrics(SM_CXDLGFRAME), -GetSystemMetrics(SM_CYDLGFRAME));
else if (wndPtr->dwStyle & WS_BORDER) else if (wndPtr->dwStyle & WS_BORDER)
InflateRect16(&rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER); InflateRect16(&rect, -GetSystemMetrics(SM_CXBORDER), -GetSystemMetrics(SM_CYBORDER));
if (!PtInRect16( &rect, pt )) return HTBORDER; if (!PtInRect16( &rect, pt )) return HTBORDER;
} }
@ -698,20 +697,20 @@ LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt )
if ((wndPtr->dwStyle & WS_CAPTION) == WS_CAPTION) if ((wndPtr->dwStyle & WS_CAPTION) == WS_CAPTION)
{ {
rect.top += sysMetrics[SM_CYCAPTION] - 1; rect.top += GetSystemMetrics(SM_CYCAPTION) - 1;
if (!PtInRect16( &rect, pt )) if (!PtInRect16( &rect, pt ))
{ {
/* Check system menu */ /* Check system menu */
if (wndPtr->dwStyle & WS_SYSMENU) if (wndPtr->dwStyle & WS_SYSMENU)
rect.left += SYSMETRICS_CXSIZE; rect.left += GetSystemMetrics(SM_CXSIZE);
if (pt.x <= rect.left) return HTSYSMENU; if (pt.x <= rect.left) return HTSYSMENU;
/* Check maximize box */ /* Check maximize box */
if (wndPtr->dwStyle & WS_MAXIMIZEBOX) if (wndPtr->dwStyle & WS_MAXIMIZEBOX)
rect.right -= SYSMETRICS_CXSIZE + 1; rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
if (pt.x >= rect.right) return HTMAXBUTTON; if (pt.x >= rect.right) return HTMAXBUTTON;
/* Check minimize box */ /* Check minimize box */
if (wndPtr->dwStyle & WS_MINIMIZEBOX) if (wndPtr->dwStyle & WS_MINIMIZEBOX)
rect.right -= SYSMETRICS_CXSIZE + 1; rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
if (pt.x >= rect.right) return HTMINBUTTON; if (pt.x >= rect.right) return HTMINBUTTON;
return HTCAPTION; return HTCAPTION;
} }
@ -728,7 +727,7 @@ LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt )
if (wndPtr->dwStyle & WS_VSCROLL) if (wndPtr->dwStyle & WS_VSCROLL)
{ {
rect.right += SYSMETRICS_CXVSCROLL; rect.right += GetSystemMetrics(SM_CXVSCROLL);
if (PtInRect16( &rect, pt )) return HTVSCROLL; if (PtInRect16( &rect, pt )) return HTVSCROLL;
} }
@ -736,12 +735,12 @@ LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt )
if (wndPtr->dwStyle & WS_HSCROLL) if (wndPtr->dwStyle & WS_HSCROLL)
{ {
rect.bottom += SYSMETRICS_CYHSCROLL; rect.bottom += GetSystemMetrics(SM_CYHSCROLL);
if (PtInRect16( &rect, pt )) if (PtInRect16( &rect, pt ))
{ {
/* Check size box */ /* Check size box */
if ((wndPtr->dwStyle & WS_VSCROLL) && if ((wndPtr->dwStyle & WS_VSCROLL) &&
(pt.x >= rect.right - SYSMETRICS_CXVSCROLL)) (pt.x >= rect.right - GetSystemMetrics(SM_CXVSCROLL)))
return HTSIZE; return HTSIZE;
return HTHSCROLL; return HTHSCROLL;
} }
@ -786,37 +785,37 @@ NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt )
/* Check borders */ /* Check borders */
if (HAS_SIZEFRAME( wndPtr->dwStyle )) if (HAS_SIZEFRAME( wndPtr->dwStyle ))
{ {
InflateRect16( &rect, -SYSMETRICS_CXFRAME, -SYSMETRICS_CYFRAME ); InflateRect16( &rect, -GetSystemMetrics(SM_CXFRAME), -GetSystemMetrics(SM_CYFRAME) );
/* if (wndPtr->dwStyle & WS_BORDER) */ /* if (wndPtr->dwStyle & WS_BORDER) */
/* InflateRect16(&rect,-SYSMETRICS_CXBORDER,-SYSMETRICS_CYBORDER); */ /* InflateRect16(&rect,-GetSystemMetrics(SM_CXBORDER),-GetSystemMetrics(SM_CYBORDER)); */
if (!PtInRect16( &rect, pt )) if (!PtInRect16( &rect, pt ))
{ {
/* Check top sizing border */ /* Check top sizing border */
if (pt.y < rect.top) if (pt.y < rect.top)
{ {
if (pt.x < rect.left+SYSMETRICS_CXSIZE) return HTTOPLEFT; if (pt.x < rect.left+GetSystemMetrics(SM_CXSIZE)) return HTTOPLEFT;
if (pt.x >= rect.right-SYSMETRICS_CXSIZE) return HTTOPRIGHT; if (pt.x >= rect.right-GetSystemMetrics(SM_CXSIZE)) return HTTOPRIGHT;
return HTTOP; return HTTOP;
} }
/* Check bottom sizing border */ /* Check bottom sizing border */
if (pt.y >= rect.bottom) if (pt.y >= rect.bottom)
{ {
if (pt.x < rect.left+SYSMETRICS_CXSIZE) return HTBOTTOMLEFT; if (pt.x < rect.left+GetSystemMetrics(SM_CXSIZE)) return HTBOTTOMLEFT;
if (pt.x >= rect.right-SYSMETRICS_CXSIZE) return HTBOTTOMRIGHT; if (pt.x >= rect.right-GetSystemMetrics(SM_CXSIZE)) return HTBOTTOMRIGHT;
return HTBOTTOM; return HTBOTTOM;
} }
/* Check left sizing border */ /* Check left sizing border */
if (pt.x < rect.left) if (pt.x < rect.left)
{ {
if (pt.y < rect.top+SYSMETRICS_CYSIZE) return HTTOPLEFT; if (pt.y < rect.top+GetSystemMetrics(SM_CYSIZE)) return HTTOPLEFT;
if (pt.y >= rect.bottom-SYSMETRICS_CYSIZE) return HTBOTTOMLEFT; if (pt.y >= rect.bottom-GetSystemMetrics(SM_CYSIZE)) return HTBOTTOMLEFT;
return HTLEFT; return HTLEFT;
} }
/* Check right sizing border */ /* Check right sizing border */
if (pt.x >= rect.right) if (pt.x >= rect.right)
{ {
if (pt.y < rect.top+SYSMETRICS_CYSIZE) return HTTOPRIGHT; if (pt.y < rect.top+GetSystemMetrics(SM_CYSIZE)) return HTTOPRIGHT;
if (pt.y >= rect.bottom-SYSMETRICS_CYSIZE) return HTBOTTOMRIGHT; if (pt.y >= rect.bottom-GetSystemMetrics(SM_CYSIZE)) return HTBOTTOMRIGHT;
return HTRIGHT; return HTRIGHT;
} }
} }
@ -824,9 +823,9 @@ NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt )
else /* No thick frame */ else /* No thick frame */
{ {
if (HAS_FIXEDFRAME( wndPtr->dwStyle, wndPtr->dwExStyle )) if (HAS_FIXEDFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
InflateRect16(&rect, -SYSMETRICS_CXDLGFRAME, -SYSMETRICS_CYDLGFRAME); InflateRect16(&rect, -GetSystemMetrics(SM_CXDLGFRAME), -GetSystemMetrics(SM_CYDLGFRAME));
/* else if (wndPtr->dwStyle & WS_BORDER) */ /* else if (wndPtr->dwStyle & WS_BORDER) */
/* InflateRect16(&rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER); */ /* InflateRect16(&rect, -GetSystemMetrics(SM_CXBORDER), -GetSystemMetrics(SM_CYBORDER)); */
if (!PtInRect16( &rect, pt )) return HTBORDER; if (!PtInRect16( &rect, pt )) return HTBORDER;
} }
@ -835,30 +834,30 @@ NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt )
if ((wndPtr->dwStyle & WS_CAPTION) == WS_CAPTION) if ((wndPtr->dwStyle & WS_CAPTION) == WS_CAPTION)
{ {
if (wndPtr->dwExStyle & WS_EX_TOOLWINDOW) if (wndPtr->dwExStyle & WS_EX_TOOLWINDOW)
rect.top += sysMetrics[SM_CYSMCAPTION] - 1; rect.top += GetSystemMetrics(SM_CYSMCAPTION) - 1;
else else
rect.top += sysMetrics[SM_CYCAPTION] - 1; rect.top += GetSystemMetrics(SM_CYCAPTION) - 1;
if (!PtInRect16( &rect, pt )) if (!PtInRect16( &rect, pt ))
{ {
/* Check system menu */ /* Check system menu */
if ((wndPtr->dwStyle & WS_SYSMENU) && if ((wndPtr->dwStyle & WS_SYSMENU) &&
((wndPtr->class->hIconSm) || (wndPtr->class->hIcon))) ((wndPtr->class->hIconSm) || (wndPtr->class->hIcon)))
rect.left += sysMetrics[SM_CYCAPTION] - 1; rect.left += GetSystemMetrics(SM_CYCAPTION) - 1;
if (pt.x < rect.left) return HTSYSMENU; if (pt.x < rect.left) return HTSYSMENU;
/* Check close button */ /* Check close button */
if (wndPtr->dwStyle & WS_SYSMENU) if (wndPtr->dwStyle & WS_SYSMENU)
rect.right -= sysMetrics[SM_CYCAPTION] - 1; rect.right -= GetSystemMetrics(SM_CYCAPTION) - 1;
if (pt.x > rect.right) return HTCLOSE; if (pt.x > rect.right) return HTCLOSE;
/* Check maximize box */ /* Check maximize box */
if (wndPtr->dwStyle & WS_MAXIMIZEBOX) if (wndPtr->dwStyle & WS_MAXIMIZEBOX)
rect.right -= SYSMETRICS_CXSIZE + 1; rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
if (pt.x > rect.right) return HTMAXBUTTON; if (pt.x > rect.right) return HTMAXBUTTON;
/* Check minimize box */ /* Check minimize box */
if (wndPtr->dwStyle & WS_MINIMIZEBOX) if (wndPtr->dwStyle & WS_MINIMIZEBOX)
rect.right -= SYSMETRICS_CXSIZE + 1; rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
if (pt.x > rect.right) return HTMINBUTTON; if (pt.x > rect.right) return HTMINBUTTON;
return HTCAPTION; return HTCAPTION;
} }
@ -875,7 +874,7 @@ NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt )
if (wndPtr->dwStyle & WS_VSCROLL) if (wndPtr->dwStyle & WS_VSCROLL)
{ {
rect.right += SYSMETRICS_CXVSCROLL; rect.right += GetSystemMetrics(SM_CXVSCROLL);
if (PtInRect16( &rect, pt )) return HTVSCROLL; if (PtInRect16( &rect, pt )) return HTVSCROLL;
} }
@ -883,12 +882,12 @@ NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt )
if (wndPtr->dwStyle & WS_HSCROLL) if (wndPtr->dwStyle & WS_HSCROLL)
{ {
rect.bottom += SYSMETRICS_CYHSCROLL; rect.bottom += GetSystemMetrics(SM_CYHSCROLL);
if (PtInRect16( &rect, pt )) if (PtInRect16( &rect, pt ))
{ {
/* Check size box */ /* Check size box */
if ((wndPtr->dwStyle & WS_VSCROLL) && if ((wndPtr->dwStyle & WS_VSCROLL) &&
(pt.x >= rect.right - SYSMETRICS_CXVSCROLL)) (pt.x >= rect.right - GetSystemMetrics(SM_CXVSCROLL)))
return HTSIZE; return HTSIZE;
return HTHSCROLL; return HTHSCROLL;
} }
@ -945,8 +944,8 @@ void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down )
NC_GetInsideRect( hwnd, &rect ); NC_GetInsideRect( hwnd, &rect );
hdcMem = CreateCompatibleDC( hdc ); hdcMem = CreateCompatibleDC( hdc );
hbitmap = SelectObject( hdcMem, hbitmapClose ); hbitmap = SelectObject( hdcMem, hbitmapClose );
BitBlt(hdc, rect.left, rect.top, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE, BitBlt(hdc, rect.left, rect.top, GetSystemMetrics(SM_CXSIZE), GetSystemMetrics(SM_CYSIZE),
hdcMem, (wndPtr->dwStyle & WS_CHILD) ? SYSMETRICS_CXSIZE : 0, 0, hdcMem, (wndPtr->dwStyle & WS_CHILD) ? GetSystemMetrics(SM_CXSIZE) : 0, 0,
down ? NOTSRCCOPY : SRCCOPY ); down ? NOTSRCCOPY : SRCCOPY );
SelectObject( hdcMem, hbitmap ); SelectObject( hdcMem, hbitmap );
DeleteDC( hdcMem ); DeleteDC( hdcMem );
@ -971,8 +970,8 @@ static void NC_DrawMaxButton( HWND hwnd, HDC16 hdc, BOOL down )
SelectObject( hdcMem, (IsZoomed(hwnd) SelectObject( hdcMem, (IsZoomed(hwnd)
? (down ? hbitmapRestoreD : hbitmapRestore) ? (down ? hbitmapRestoreD : hbitmapRestore)
: (down ? hbitmapMaximizeD : hbitmapMaximize)) ); : (down ? hbitmapMaximizeD : hbitmapMaximize)) );
BitBlt( hdc, rect.right - SYSMETRICS_CXSIZE - 1, rect.top, BitBlt( hdc, rect.right - GetSystemMetrics(SM_CXSIZE) - 1, rect.top,
SYSMETRICS_CXSIZE + 1, SYSMETRICS_CYSIZE, hdcMem, 0, 0, GetSystemMetrics(SM_CXSIZE) + 1, GetSystemMetrics(SM_CYSIZE), hdcMem, 0, 0,
SRCCOPY ); SRCCOPY );
DeleteDC( hdcMem ); DeleteDC( hdcMem );
} }
@ -995,9 +994,9 @@ static void NC_DrawMinButton( HWND hwnd, HDC16 hdc, BOOL down )
NC_GetInsideRect( hwnd, &rect ); NC_GetInsideRect( hwnd, &rect );
hdcMem = CreateCompatibleDC( hdc ); hdcMem = CreateCompatibleDC( hdc );
SelectObject( hdcMem, (down ? hbitmapMinimizeD : hbitmapMinimize) ); SelectObject( hdcMem, (down ? hbitmapMinimizeD : hbitmapMinimize) );
if (wndPtr->dwStyle & WS_MAXIMIZEBOX) rect.right -= SYSMETRICS_CXSIZE+1; if (wndPtr->dwStyle & WS_MAXIMIZEBOX) rect.right -= GetSystemMetrics(SM_CXSIZE)+1;
BitBlt( hdc, rect.right - SYSMETRICS_CXSIZE - 1, rect.top, BitBlt( hdc, rect.right - GetSystemMetrics(SM_CXSIZE) - 1, rect.top,
SYSMETRICS_CXSIZE + 1, SYSMETRICS_CYSIZE, hdcMem, 0, 0, GetSystemMetrics(SM_CXSIZE) + 1, GetSystemMetrics(SM_CYSIZE), hdcMem, 0, 0,
SRCCOPY ); SRCCOPY );
DeleteDC( hdcMem ); DeleteDC( hdcMem );
} }
@ -1041,8 +1040,8 @@ NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down)
if (hIcon) if (hIcon)
DrawIconEx (hdc, rect.left + 2, rect.top + 2, hIcon, DrawIconEx (hdc, rect.left + 2, rect.top + 2, hIcon,
sysMetrics[SM_CXSMICON], GetSystemMetrics(SM_CXSMICON),
sysMetrics[SM_CYSMICON], GetSystemMetrics(SM_CYSMICON),
0, 0, DI_NORMAL); 0, 0, DI_NORMAL);
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
@ -1085,8 +1084,8 @@ void NC_DrawCloseButton95 (HWND hwnd, HDC hdc, BOOL down)
hBmp = down ? hbitmapCloseD : hbitmapClose; hBmp = down ? hbitmapCloseD : hbitmapClose;
hOldBmp = SelectObject (hdcMem, hBmp); hOldBmp = SelectObject (hdcMem, hBmp);
GetObjectA (hBmp, sizeof(BITMAP), &bmp); GetObjectA (hBmp, sizeof(BITMAP), &bmp);
BitBlt (hdc, rect.right - (sysMetrics[SM_CYCAPTION] + 1 + bmp.bmWidth) / 2, BitBlt (hdc, rect.right - (GetSystemMetrics(SM_CYCAPTION) + 1 + bmp.bmWidth) / 2,
rect.top + (sysMetrics[SM_CYCAPTION] - 1 - bmp.bmHeight) / 2, rect.top + (GetSystemMetrics(SM_CYCAPTION) - 1 - bmp.bmHeight) / 2,
bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY); bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY);
SelectObject (hdcMem, hOldBmp); SelectObject (hdcMem, hOldBmp);
@ -1135,10 +1134,10 @@ static void NC_DrawMaxButton95(HWND hwnd,HDC16 hdc,BOOL down )
GetObjectA (hBmp, sizeof(BITMAP), &bmp); GetObjectA (hBmp, sizeof(BITMAP), &bmp);
if (wndPtr->dwStyle & WS_SYSMENU) if (wndPtr->dwStyle & WS_SYSMENU)
rect.right -= sysMetrics[SM_CYCAPTION] + 1; rect.right -= GetSystemMetrics(SM_CYCAPTION) + 1;
BitBlt( hdc, rect.right - (sysMetrics[SM_CXSIZE] + bmp.bmWidth) / 2, BitBlt( hdc, rect.right - (GetSystemMetrics(SM_CXSIZE) + bmp.bmWidth) / 2,
rect.top + (sysMetrics[SM_CYCAPTION] - 1 - bmp.bmHeight) / 2, rect.top + (GetSystemMetrics(SM_CYCAPTION) - 1 - bmp.bmHeight) / 2,
bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY ); bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY );
SelectObject (hdcMem, hOldBmp); SelectObject (hdcMem, hOldBmp);
DeleteDC( hdcMem ); DeleteDC( hdcMem );
@ -1185,13 +1184,13 @@ static void NC_DrawMinButton95(HWND hwnd,HDC16 hdc,BOOL down )
GetObjectA (hBmp, sizeof(BITMAP), &bmp); GetObjectA (hBmp, sizeof(BITMAP), &bmp);
if (wndPtr->dwStyle & WS_SYSMENU) if (wndPtr->dwStyle & WS_SYSMENU)
rect.right -= sysMetrics[SM_CYCAPTION] + 1; rect.right -= GetSystemMetrics(SM_CYCAPTION) + 1;
if (wndPtr->dwStyle & WS_MAXIMIZEBOX) if (wndPtr->dwStyle & WS_MAXIMIZEBOX)
rect.right += -1 - (sysMetrics[SM_CXSIZE] + bmp.bmWidth) / 2; rect.right += -1 - (GetSystemMetrics(SM_CXSIZE) + bmp.bmWidth) / 2;
BitBlt( hdc, rect.right - (sysMetrics[SM_CXSIZE] + bmp.bmWidth) / 2, BitBlt( hdc, rect.right - (GetSystemMetrics(SM_CXSIZE) + bmp.bmWidth) / 2,
rect.top + (sysMetrics[SM_CYCAPTION] - 1 - bmp.bmHeight) / 2, rect.top + (GetSystemMetrics(SM_CYCAPTION) - 1 - bmp.bmHeight) / 2,
bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY ); bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY );
SelectObject (hdcMem, hOldBmp); SelectObject (hdcMem, hOldBmp);
@ -1216,15 +1215,15 @@ static void NC_DrawFrame( HDC hdc, RECT *rect, BOOL dlgFrame,
if (dlgFrame) if (dlgFrame)
{ {
width = SYSMETRICS_CXDLGFRAME - 1; width = GetSystemMetrics(SM_CXDLGFRAME) - 1;
height = SYSMETRICS_CYDLGFRAME - 1; height = GetSystemMetrics(SM_CYDLGFRAME) - 1;
SelectObject( hdc, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : SelectObject( hdc, GetSysColorBrush(active ? COLOR_ACTIVECAPTION :
COLOR_INACTIVECAPTION) ); COLOR_INACTIVECAPTION) );
} }
else else
{ {
width = SYSMETRICS_CXFRAME - 1; width = GetSystemMetrics(SM_CXFRAME) - 1;
height = SYSMETRICS_CYFRAME - 1; height = GetSystemMetrics(SM_CYFRAME) - 1;
SelectObject( hdc, GetSysColorBrush(active ? COLOR_ACTIVEBORDER : SelectObject( hdc, GetSysColorBrush(active ? COLOR_ACTIVEBORDER :
COLOR_INACTIVEBORDER) ); COLOR_INACTIVEBORDER) );
} }
@ -1245,8 +1244,8 @@ static void NC_DrawFrame( HDC hdc, RECT *rect, BOOL dlgFrame,
} }
else else
{ {
INT decYOff = SYSMETRICS_CXFRAME + SYSMETRICS_CXSIZE; INT decYOff = GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXSIZE);
INT decXOff = SYSMETRICS_CYFRAME + SYSMETRICS_CYSIZE; INT decXOff = GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYSIZE);
/* Draw inner rectangle */ /* Draw inner rectangle */
@ -1319,13 +1318,13 @@ static void NC_DrawFrame95(
if (dlgFrame) if (dlgFrame)
{ {
width = sysMetrics[SM_CXDLGFRAME] - sysMetrics[SM_CXEDGE]; width = GetSystemMetrics(SM_CXDLGFRAME) - GetSystemMetrics(SM_CXEDGE);
height = sysMetrics[SM_CYDLGFRAME] - sysMetrics[SM_CYEDGE]; height = GetSystemMetrics(SM_CYDLGFRAME) - GetSystemMetrics(SM_CYEDGE);
} }
else else
{ {
width = sysMetrics[SM_CXFRAME] - sysMetrics[SM_CXEDGE]; width = GetSystemMetrics(SM_CXFRAME) - GetSystemMetrics(SM_CXEDGE);
height = sysMetrics[SM_CYFRAME] - sysMetrics[SM_CYEDGE]; height = GetSystemMetrics(SM_CYFRAME) - GetSystemMetrics(SM_CYEDGE);
} }
SelectObject( hdc, GetSysColorBrush(active ? COLOR_ACTIVEBORDER : SelectObject( hdc, GetSysColorBrush(active ? COLOR_ACTIVEBORDER :
@ -1357,8 +1356,8 @@ static void NC_DrawMovingFrame( HDC hdc, RECT *rect, BOOL thickframe )
{ {
RECT16 r16; RECT16 r16;
CONV_RECT32TO16( rect, &r16 ); CONV_RECT32TO16( rect, &r16 );
FastWindowFrame16( hdc, &r16, SYSMETRICS_CXFRAME, FastWindowFrame16( hdc, &r16, GetSystemMetrics(SM_CXFRAME),
SYSMETRICS_CYFRAME, PATINVERT ); GetSystemMetrics(SM_CYFRAME), PATINVERT );
} }
else DrawFocusRect( hdc, rect ); else DrawFocusRect( hdc, rect );
} }
@ -1416,19 +1415,19 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd,
if (style & WS_SYSMENU) if (style & WS_SYSMENU)
{ {
NC_DrawSysButton( hwnd, hdc, FALSE ); NC_DrawSysButton( hwnd, hdc, FALSE );
r.left += SYSMETRICS_CXSIZE + 1; r.left += GetSystemMetrics(SM_CXSIZE) + 1;
MoveTo16( hdc, r.left - 1, r.top ); MoveTo16( hdc, r.left - 1, r.top );
LineTo( hdc, r.left - 1, r.bottom ); LineTo( hdc, r.left - 1, r.bottom );
} }
if (style & WS_MAXIMIZEBOX) if (style & WS_MAXIMIZEBOX)
{ {
NC_DrawMaxButton( hwnd, hdc, FALSE ); NC_DrawMaxButton( hwnd, hdc, FALSE );
r.right -= SYSMETRICS_CXSIZE + 1; r.right -= GetSystemMetrics(SM_CXSIZE) + 1;
} }
if (style & WS_MINIMIZEBOX) if (style & WS_MINIMIZEBOX)
{ {
NC_DrawMinButton( hwnd, hdc, FALSE ); NC_DrawMinButton( hwnd, hdc, FALSE );
r.right -= SYSMETRICS_CXSIZE + 1; r.right -= GetSystemMetrics(SM_CXSIZE) + 1;
} }
FillRect( hdc, &r, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : FillRect( hdc, &r, GetSysColorBrush(active ? COLOR_ACTIVECAPTION :
@ -1512,19 +1511,19 @@ static void NC_DrawCaption95(
if ((style & WS_SYSMENU) && !(exStyle & WS_EX_TOOLWINDOW)) { if ((style & WS_SYSMENU) && !(exStyle & WS_EX_TOOLWINDOW)) {
if (NC_DrawSysButton95 (hwnd, hdc, FALSE)) if (NC_DrawSysButton95 (hwnd, hdc, FALSE))
r.left += sysMetrics[SM_CYCAPTION] - 1; r.left += GetSystemMetrics(SM_CYCAPTION) - 1;
} }
if (style & WS_SYSMENU) { if (style & WS_SYSMENU) {
NC_DrawCloseButton95 (hwnd, hdc, FALSE); NC_DrawCloseButton95 (hwnd, hdc, FALSE);
r.right -= sysMetrics[SM_CYCAPTION] - 1; r.right -= GetSystemMetrics(SM_CYCAPTION) - 1;
} }
if (style & WS_MAXIMIZEBOX) { if (style & WS_MAXIMIZEBOX) {
NC_DrawMaxButton95( hwnd, hdc, FALSE ); NC_DrawMaxButton95( hwnd, hdc, FALSE );
r.right -= SYSMETRICS_CXSIZE + 1; r.right -= GetSystemMetrics(SM_CXSIZE) + 1;
} }
if (style & WS_MINIMIZEBOX) { if (style & WS_MINIMIZEBOX) {
NC_DrawMinButton95( hwnd, hdc, FALSE ); NC_DrawMinButton95( hwnd, hdc, FALSE );
r.right -= SYSMETRICS_CXSIZE + 1; r.right -= GetSystemMetrics(SM_CXSIZE) + 1;
} }
if (GetWindowTextA( hwnd, buffer, sizeof(buffer) )) { if (GetWindowTextA( hwnd, buffer, sizeof(buffer) )) {
@ -1605,8 +1604,8 @@ void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint )
if ((wndPtr->dwStyle & WS_CAPTION) == WS_CAPTION) if ((wndPtr->dwStyle & WS_CAPTION) == WS_CAPTION)
{ {
RECT r = rect; RECT r = rect;
r.bottom = rect.top + SYSMETRICS_CYSIZE; r.bottom = rect.top + GetSystemMetrics(SM_CYSIZE);
rect.top += SYSMETRICS_CYSIZE + SYSMETRICS_CYBORDER; rect.top += GetSystemMetrics(SM_CYSIZE) + GetSystemMetrics(SM_CYBORDER);
NC_DrawCaption( hdc, &r, hwnd, wndPtr->dwStyle, active ); NC_DrawCaption( hdc, &r, hwnd, wndPtr->dwStyle, active );
} }
} }
@ -1614,7 +1613,7 @@ void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint )
if (HAS_MENU(wndPtr)) if (HAS_MENU(wndPtr))
{ {
RECT r = rect; RECT r = rect;
r.bottom = rect.top + SYSMETRICS_CYMENU; /* default height */ r.bottom = rect.top + GetSystemMetrics(SM_CYMENU); /* default height */
rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ); rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint );
} }
@ -1630,8 +1629,8 @@ void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint )
if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL)) if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL))
{ {
RECT r = rect; RECT r = rect;
r.left = r.right - SYSMETRICS_CXVSCROLL + 1; r.left = r.right - GetSystemMetrics(SM_CXVSCROLL) + 1;
r.top = r.bottom - SYSMETRICS_CYHSCROLL + 1; r.top = r.bottom - GetSystemMetrics(SM_CYHSCROLL) + 1;
if(wndPtr->dwStyle & WS_BORDER) { if(wndPtr->dwStyle & WS_BORDER) {
r.left++; r.left++;
r.top++; r.top++;
@ -1731,12 +1730,12 @@ void NC_DoNCPaint95(
{ {
RECT r = rect; RECT r = rect;
if (wndPtr->dwExStyle & WS_EX_TOOLWINDOW) { if (wndPtr->dwExStyle & WS_EX_TOOLWINDOW) {
r.bottom = rect.top + sysMetrics[SM_CYSMCAPTION]; r.bottom = rect.top + GetSystemMetrics(SM_CYSMCAPTION);
rect.top += sysMetrics[SM_CYSMCAPTION]; rect.top += GetSystemMetrics(SM_CYSMCAPTION);
} }
else { else {
r.bottom = rect.top + sysMetrics[SM_CYCAPTION]; r.bottom = rect.top + GetSystemMetrics(SM_CYCAPTION);
rect.top += sysMetrics[SM_CYCAPTION]; rect.top += GetSystemMetrics(SM_CYCAPTION);
} }
if( !clip || IntersectRect( &rfuzz, &r, &rectClip ) ) if( !clip || IntersectRect( &rfuzz, &r, &rectClip ) )
NC_DrawCaption95 (hdc, &r, hwnd, wndPtr->dwStyle, NC_DrawCaption95 (hdc, &r, hwnd, wndPtr->dwStyle,
@ -1747,7 +1746,7 @@ void NC_DoNCPaint95(
if (HAS_MENU(wndPtr)) if (HAS_MENU(wndPtr))
{ {
RECT r = rect; RECT r = rect;
r.bottom = rect.top + sysMetrics[SM_CYMENU]; r.bottom = rect.top + GetSystemMetrics(SM_CYMENU);
TRACE_(nonclient)("Calling DrawMenuBar with " TRACE_(nonclient)("Calling DrawMenuBar with "
"rect (%d, %d)-(%d, %d)\n", r.left, r.top, "rect (%d, %d)-(%d, %d)\n", r.left, r.top,
@ -1776,8 +1775,8 @@ void NC_DoNCPaint95(
if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL)) if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL))
{ {
RECT r = rect; RECT r = rect;
r.left = r.right - SYSMETRICS_CXVSCROLL + 1; r.left = r.right - GetSystemMetrics(SM_CXVSCROLL) + 1;
r.top = r.bottom - SYSMETRICS_CYHSCROLL + 1; r.top = r.bottom - GetSystemMetrics(SM_CYHSCROLL) + 1;
FillRect( hdc, &r, GetSysColorBrush(COLOR_SCROLLBAR) ); FillRect( hdc, &r, GetSysColorBrush(COLOR_SCROLLBAR) );
} }
@ -1914,12 +1913,12 @@ BOOL NC_GetSysPopupPos( WND* wndPtr, RECT* rect )
if (wndPtr->dwStyle & WS_CHILD) if (wndPtr->dwStyle & WS_CHILD)
ClientToScreen( wndPtr->parent->hwndSelf, (POINT *)rect ); ClientToScreen( wndPtr->parent->hwndSelf, (POINT *)rect );
if (TWEAK_WineLook == WIN31_LOOK) { if (TWEAK_WineLook == WIN31_LOOK) {
rect->right = rect->left + SYSMETRICS_CXSIZE; rect->right = rect->left + GetSystemMetrics(SM_CXSIZE);
rect->bottom = rect->top + SYSMETRICS_CYSIZE; rect->bottom = rect->top + GetSystemMetrics(SM_CYSIZE);
} }
else { else {
rect->right = rect->left + sysMetrics[SM_CYCAPTION] - 1; rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1;
rect->bottom = rect->top + sysMetrics[SM_CYCAPTION] - 1; rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1;
} }
} }
return TRUE; return TRUE;
@ -1949,13 +1948,13 @@ static LONG NC_StartSizeMove( WND* wndPtr, WPARAM16 wParam,
else else
NC_GetInsideRect95( wndPtr->hwndSelf, &rect ); NC_GetInsideRect95( wndPtr->hwndSelf, &rect );
if (wndPtr->dwStyle & WS_SYSMENU) if (wndPtr->dwStyle & WS_SYSMENU)
rect.left += SYSMETRICS_CXSIZE + 1; rect.left += GetSystemMetrics(SM_CXSIZE) + 1;
if (wndPtr->dwStyle & WS_MINIMIZEBOX) if (wndPtr->dwStyle & WS_MINIMIZEBOX)
rect.right -= SYSMETRICS_CXSIZE + 1; rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
if (wndPtr->dwStyle & WS_MAXIMIZEBOX) if (wndPtr->dwStyle & WS_MAXIMIZEBOX)
rect.right -= SYSMETRICS_CXSIZE + 1; rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
pt.x = wndPtr->rectWindow.left + (rect.right - rect.left) / 2; pt.x = wndPtr->rectWindow.left + (rect.right - rect.left) / 2;
pt.y = wndPtr->rectWindow.top + rect.top + SYSMETRICS_CYSIZE/2; pt.y = wndPtr->rectWindow.top + rect.top + GetSystemMetrics(SM_CYSIZE)/2;
hittest = HTCAPTION; hittest = HTCAPTION;
*capturePoint = pt; *capturePoint = pt;
} }
@ -1982,21 +1981,21 @@ static LONG NC_StartSizeMove( WND* wndPtr, WPARAM16 wParam,
case VK_UP: case VK_UP:
hittest = HTTOP; hittest = HTTOP;
pt.x =(wndPtr->rectWindow.left+wndPtr->rectWindow.right)/2; pt.x =(wndPtr->rectWindow.left+wndPtr->rectWindow.right)/2;
pt.y = wndPtr->rectWindow.top + SYSMETRICS_CYFRAME / 2; pt.y = wndPtr->rectWindow.top + GetSystemMetrics(SM_CYFRAME) / 2;
break; break;
case VK_DOWN: case VK_DOWN:
hittest = HTBOTTOM; hittest = HTBOTTOM;
pt.x =(wndPtr->rectWindow.left+wndPtr->rectWindow.right)/2; pt.x =(wndPtr->rectWindow.left+wndPtr->rectWindow.right)/2;
pt.y = wndPtr->rectWindow.bottom - SYSMETRICS_CYFRAME / 2; pt.y = wndPtr->rectWindow.bottom - GetSystemMetrics(SM_CYFRAME) / 2;
break; break;
case VK_LEFT: case VK_LEFT:
hittest = HTLEFT; hittest = HTLEFT;
pt.x = wndPtr->rectWindow.left + SYSMETRICS_CXFRAME / 2; pt.x = wndPtr->rectWindow.left + GetSystemMetrics(SM_CXFRAME) / 2;
pt.y =(wndPtr->rectWindow.top+wndPtr->rectWindow.bottom)/2; pt.y =(wndPtr->rectWindow.top+wndPtr->rectWindow.bottom)/2;
break; break;
case VK_RIGHT: case VK_RIGHT:
hittest = HTRIGHT; hittest = HTRIGHT;
pt.x = wndPtr->rectWindow.right - SYSMETRICS_CXFRAME / 2; pt.x = wndPtr->rectWindow.right - GetSystemMetrics(SM_CXFRAME) / 2;
pt.y =(wndPtr->rectWindow.top+wndPtr->rectWindow.bottom)/2; pt.y =(wndPtr->rectWindow.top+wndPtr->rectWindow.bottom)/2;
break; break;
case VK_RETURN: case VK_RETURN:
@ -2068,7 +2067,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
if (wndPtr->dwStyle & WS_CHILD) if (wndPtr->dwStyle & WS_CHILD)
GetClientRect( wndPtr->parent->hwndSelf, &mouseRect ); GetClientRect( wndPtr->parent->hwndSelf, &mouseRect );
else else
SetRect(&mouseRect, 0, 0, SYSMETRICS_CXSCREEN, SYSMETRICS_CYSCREEN); SetRect(&mouseRect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
if (ON_LEFT_BORDER(hittest)) if (ON_LEFT_BORDER(hittest))
{ {
mouseRect.left = MAX( mouseRect.left, sizingRect.right-maxTrack.x ); mouseRect.left = MAX( mouseRect.left, sizingRect.right-maxTrack.x );

View File

@ -16,7 +16,6 @@
#include "gdi.h" #include "gdi.h"
#include "dce.h" #include "dce.h"
#include "region.h" #include "region.h"
#include "sysmetrics.h"
#include "debug.h" #include "debug.h"
DEFAULT_DEBUG_CHANNEL(scroll) DEFAULT_DEBUG_CHANNEL(scroll)

View File

@ -10,10 +10,9 @@
#include "winuser.h" #include "winuser.h"
#include "monitor.h" #include "monitor.h"
#include "options.h" #include "options.h"
#include "sysmetrics.h"
#include "tweak.h" #include "tweak.h"
short sysMetrics[SM_CMETRICS+1]; static short sysMetrics[SM_CMETRICS+1];
/*********************************************************************** /***********************************************************************
* SYSMETRICS_Init * SYSMETRICS_Init

View File

@ -14,7 +14,6 @@
#include "heap.h" #include "heap.h"
#include "user.h" #include "user.h"
#include "dce.h" #include "dce.h"
#include "sysmetrics.h"
#include "cursoricon.h" #include "cursoricon.h"
#include "hook.h" #include "hook.h"
#include "menu.h" #include "menu.h"
@ -641,8 +640,8 @@ BOOL WIN_CreateDesktopWindow(void)
pWndDesktop->hInstance = 0; pWndDesktop->hInstance = 0;
pWndDesktop->rectWindow.left = 0; pWndDesktop->rectWindow.left = 0;
pWndDesktop->rectWindow.top = 0; pWndDesktop->rectWindow.top = 0;
pWndDesktop->rectWindow.right = SYSMETRICS_CXSCREEN; pWndDesktop->rectWindow.right = GetSystemMetrics(SM_CXSCREEN);
pWndDesktop->rectWindow.bottom = SYSMETRICS_CYSCREEN; pWndDesktop->rectWindow.bottom = GetSystemMetrics(SM_CYSCREEN);
pWndDesktop->rectClient = pWndDesktop->rectWindow; pWndDesktop->rectClient = pWndDesktop->rectWindow;
pWndDesktop->text = NULL; pWndDesktop->text = NULL;
pWndDesktop->hmemTaskQ = GetFastQueue16(); pWndDesktop->hmemTaskQ = GetFastQueue16();

View File

@ -7,7 +7,6 @@
#include <string.h> #include <string.h>
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "sysmetrics.h"
#include "heap.h" #include "heap.h"
#include "module.h" #include "module.h"
#include "user.h" #include "user.h"
@ -126,12 +125,12 @@ static POINT16 WINPOS_FindIconPos( WND* wndPtr, POINT16 pt )
short x, y, xspacing, yspacing; short x, y, xspacing, yspacing;
GetClientRect16( wndPtr->parent->hwndSelf, &rectParent ); GetClientRect16( wndPtr->parent->hwndSelf, &rectParent );
if ((pt.x >= rectParent.left) && (pt.x + SYSMETRICS_CXICON < rectParent.right) && if ((pt.x >= rectParent.left) && (pt.x + GetSystemMetrics(SM_CXICON) < rectParent.right) &&
(pt.y >= rectParent.top) && (pt.y + SYSMETRICS_CYICON < rectParent.bottom)) (pt.y >= rectParent.top) && (pt.y + GetSystemMetrics(SM_CYICON) < rectParent.bottom))
return pt; /* The icon already has a suitable position */ return pt; /* The icon already has a suitable position */
xspacing = SYSMETRICS_CXICONSPACING; xspacing = GetSystemMetrics(SM_CXICONSPACING);
yspacing = SYSMETRICS_CYICONSPACING; yspacing = GetSystemMetrics(SM_CYICONSPACING);
y = rectParent.bottom; y = rectParent.bottom;
for (;;) for (;;)
@ -155,8 +154,8 @@ static POINT16 WINPOS_FindIconPos( WND* wndPtr, POINT16 pt )
WIN_ReleaseWndPtr(childPtr); WIN_ReleaseWndPtr(childPtr);
if (!childPtr) /* No window was found, so it's OK for us */ if (!childPtr) /* No window was found, so it's OK for us */
{ {
pt.x = x + (xspacing - SYSMETRICS_CXICON) / 2; pt.x = x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2;
pt.y = y - (yspacing + SYSMETRICS_CYICON) / 2; pt.y = y - (yspacing + GetSystemMetrics(SM_CYICON)) / 2;
return pt; return pt;
} }
} }
@ -184,8 +183,8 @@ UINT WINAPI ArrangeIconicWindows( HWND parent )
GetClientRect( parent, &rectParent ); GetClientRect( parent, &rectParent );
x = rectParent.left; x = rectParent.left;
y = rectParent.bottom; y = rectParent.bottom;
xspacing = SYSMETRICS_CXICONSPACING; xspacing = GetSystemMetrics(SM_CXICONSPACING);
yspacing = SYSMETRICS_CYICONSPACING; yspacing = GetSystemMetrics(SM_CYICONSPACING);
hwndChild = GetWindow( parent, GW_CHILD ); hwndChild = GetWindow( parent, GW_CHILD );
while (hwndChild) while (hwndChild)
@ -196,8 +195,8 @@ UINT WINAPI ArrangeIconicWindows( HWND parent )
WINPOS_ShowIconTitle( wndPtr, FALSE ); WINPOS_ShowIconTitle( wndPtr, FALSE );
SetWindowPos( hwndChild, 0, x + (xspacing - SYSMETRICS_CXICON) / 2, SetWindowPos( hwndChild, 0, x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2,
y - yspacing - SYSMETRICS_CYICON/2, 0, 0, y - yspacing - GetSystemMetrics(SM_CYICON)/2, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE );
if( IsWindow(hwndChild) ) if( IsWindow(hwndChild) )
WINPOS_ShowIconTitle(wndPtr , TRUE ); WINPOS_ShowIconTitle(wndPtr , TRUE );
@ -1080,31 +1079,31 @@ void WINPOS_GetMinMaxInfo( WND *wndPtr, POINT *maxSize, POINT *maxPos,
/* Compute default values */ /* Compute default values */
MinMax.ptMaxSize.x = SYSMETRICS_CXSCREEN; MinMax.ptMaxSize.x = GetSystemMetrics(SM_CXSCREEN);
MinMax.ptMaxSize.y = SYSMETRICS_CYSCREEN; MinMax.ptMaxSize.y = GetSystemMetrics(SM_CYSCREEN);
MinMax.ptMinTrackSize.x = SYSMETRICS_CXMINTRACK; MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK);
MinMax.ptMinTrackSize.y = SYSMETRICS_CYMINTRACK; MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK);
MinMax.ptMaxTrackSize.x = SYSMETRICS_CXSCREEN; MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXSCREEN);
MinMax.ptMaxTrackSize.y = SYSMETRICS_CYSCREEN; MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYSCREEN);
if (wndPtr->flags & WIN_MANAGED) xinc = yinc = 0; if (wndPtr->flags & WIN_MANAGED) xinc = yinc = 0;
else if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle )) else if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
{ {
xinc = SYSMETRICS_CXDLGFRAME; xinc = GetSystemMetrics(SM_CXDLGFRAME);
yinc = SYSMETRICS_CYDLGFRAME; yinc = GetSystemMetrics(SM_CYDLGFRAME);
} }
else else
{ {
xinc = yinc = 0; xinc = yinc = 0;
if (HAS_THICKFRAME(wndPtr->dwStyle)) if (HAS_THICKFRAME(wndPtr->dwStyle))
{ {
xinc += SYSMETRICS_CXFRAME; xinc += GetSystemMetrics(SM_CXFRAME);
yinc += SYSMETRICS_CYFRAME; yinc += GetSystemMetrics(SM_CYFRAME);
} }
if (wndPtr->dwStyle & WS_BORDER) if (wndPtr->dwStyle & WS_BORDER)
{ {
xinc += SYSMETRICS_CXBORDER; xinc += GetSystemMetrics(SM_CXBORDER);
yinc += SYSMETRICS_CYBORDER; yinc += GetSystemMetrics(SM_CYBORDER);
} }
} }
MinMax.ptMaxSize.x += 2 * xinc; MinMax.ptMaxSize.x += 2 * xinc;
@ -1184,7 +1183,7 @@ UINT WINPOS_MinMaximize( WND* wndPtr, UINT16 cmd, LPRECT16 lpRect )
lpPos->ptIconPos = WINPOS_FindIconPos( wndPtr, lpPos->ptIconPos ); lpPos->ptIconPos = WINPOS_FindIconPos( wndPtr, lpPos->ptIconPos );
SetRect16( lpRect, lpPos->ptIconPos.x, lpPos->ptIconPos.y, SetRect16( lpRect, lpPos->ptIconPos.x, lpPos->ptIconPos.y,
SYSMETRICS_CXICON, SYSMETRICS_CYICON ); GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON) );
swpFlags |= SWP_NOCOPYBITS; swpFlags |= SWP_NOCOPYBITS;
break; break;