Commit ddca3153 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Replaced all occurences of SYSMETRICS_xx and sysMetrics[SM_xx] by

GetSystemMetrics(SM_xx), removed no longer needed includes of sysmetrics.h.
parent f7bd7adb
......@@ -8,7 +8,6 @@
#include <string.h>
#include "win.h"
#include "button.h"
#include "winuser.h"
#include "wine/winuser16.h"
#include "tweak.h"
......
......@@ -8,9 +8,10 @@
#include <string.h>
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/winuser16.h"
#include "sysmetrics.h"
#include "win.h"
#include "spy.h"
#include "user.h"
......
......@@ -9,7 +9,6 @@
#include <unistd.h>
#include "winuser.h"
#include "wine/winuser16.h"
#include "sysmetrics.h"
#include "win.h"
#include "desktop.h"
#include "heap.h"
......@@ -95,8 +94,9 @@ static BOOL ICONTITLE_GetTitlePos( WND* wnd, LPRECT lpRect )
{
HFONT hPrevFont = SelectObject( hDC, hIconTitleFont );
SetRect( lpRect, 0, 0, sysMetrics[SM_CXICONSPACING] -
SYSMETRICS_CXBORDER * 2, SYSMETRICS_CYBORDER * 2 );
SetRect( lpRect, 0, 0, GetSystemMetrics(SM_CXICONSPACING) -
GetSystemMetrics(SM_CXBORDER) * 2,
GetSystemMetrics(SM_CYBORDER) * 2 );
DrawTextA( hDC, str, length, lpRect, DT_CALCRECT |
DT_CENTER | DT_NOPREFIX | DT_WORDBREAK |
......@@ -105,11 +105,11 @@ static BOOL ICONTITLE_GetTitlePos( WND* wnd, LPRECT lpRect )
SelectObject( hDC, hPrevFont );
ReleaseDC( wnd->hwndSelf, hDC );
lpRect->right += 4 * SYSMETRICS_CXBORDER - lpRect->left;
lpRect->left = wnd->owner->rectWindow.left + SYSMETRICS_CXICON / 2 -
lpRect->right += 4 * GetSystemMetrics(SM_CXBORDER) - lpRect->left;
lpRect->left = wnd->owner->rectWindow.left + GetSystemMetrics(SM_CXICON) / 2 -
(lpRect->right - lpRect->left) / 2;
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 );
return ( hDC ) ? TRUE : FALSE;
......
......@@ -20,7 +20,6 @@
#include "win.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "sysmetrics.h"
#include "task.h"
#include "heap.h"
#include "menu.h"
......@@ -783,9 +782,9 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
lpitem->rect.right += size.cx;
if (TWEAK_WineLook == WIN31_LOOK)
lpitem->rect.bottom += MAX( size.cy, SYSMETRICS_CYMENU );
lpitem->rect.bottom += MAX( size.cy, GetSystemMetrics(SM_CYMENU) );
else
lpitem->rect.bottom += MAX (size.cy, sysMetrics[SM_CYMENU]- 1);
lpitem->rect.bottom += MAX (size.cy, GetSystemMetrics(SM_CYMENU)-1);
lpitem->xTab = 0;
if (menuBar)
......@@ -830,13 +829,13 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner )
SelectObject( hdc, hMenuFont);
start = 0;
maxX = (TWEAK_WineLook == WIN31_LOOK) ? SYSMETRICS_CXBORDER : 2 ;
maxX = (TWEAK_WineLook == WIN31_LOOK) ? GetSystemMetrics(SM_CXBORDER) : 2 ;
while (start < lppop->nItems)
{
lpitem = &lppop->items[start];
orgX = maxX;
orgY = (TWEAK_WineLook == WIN31_LOOK) ? SYSMETRICS_CYBORDER : 2;
orgY = (TWEAK_WineLook == WIN31_LOOK) ? GetSystemMetrics(SM_CYBORDER) : 2;
maxTab = maxTabWidth = 0;
......@@ -1272,8 +1271,8 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
if(TWEAK_WineLook == WIN31_LOOK)
{
rect.bottom -= POPUP_YSHADE * SYSMETRICS_CYBORDER;
rect.right -= POPUP_XSHADE * SYSMETRICS_CXBORDER;
rect.bottom -= POPUP_YSHADE * GetSystemMetrics(SM_CYBORDER);
rect.right -= POPUP_XSHADE * GetSystemMetrics(SM_CXBORDER);
}
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? */
PatBlt( hdc, i & 0xfffffffe,
rect.top + POPUP_YSHADE*SYSMETRICS_CYBORDER,
i%2 + POPUP_XSHADE*SYSMETRICS_CXBORDER,
rect.top + POPUP_YSHADE*GetSystemMetrics(SM_CYBORDER),
i%2 + POPUP_XSHADE*GetSystemMetrics(SM_CXBORDER),
rect.bottom - rect.top, 0x00a000c9 );
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%2 + POPUP_YSHADE*SYSMETRICS_CYBORDER, 0x00a000c9 );
i%2 + POPUP_YSHADE*GetSystemMetrics(SM_CYBORDER), 0x00a000c9 );
SelectObject( hdc, hPrevPen );
SelectObject( hdc, hPrevBrush );
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 );
if (lppop == NULL || lprect == NULL)
{
retvalue = SYSMETRICS_CYMENU;
retvalue = GetSystemMetrics(SM_CYMENU);
goto END;
}
......@@ -1385,7 +1384,7 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd,
if (lppop->nItems == 0)
{
retvalue = SYSMETRICS_CYMENU;
retvalue = GetSystemMetrics(SM_CYMENU);
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 */
width = menu->Width + SYSMETRICS_CXBORDER;
height = menu->Height + SYSMETRICS_CYBORDER;
width = menu->Width + GetSystemMetrics(SM_CXBORDER);
height = menu->Height + GetSystemMetrics(SM_CYBORDER);
if( x + width > SYSMETRICS_CXSCREEN )
if( x + width > GetSystemMetrics(SM_CXSCREEN ))
{
if( xanchor )
x -= width - xanchor;
if( x + width > SYSMETRICS_CXSCREEN)
x = SYSMETRICS_CXSCREEN - width;
if( x + width > GetSystemMetrics(SM_CXSCREEN))
x = GetSystemMetrics(SM_CXSCREEN) - width;
}
if( x < 0 ) x = 0;
if( y + height > SYSMETRICS_CYSCREEN )
if( y + height > GetSystemMetrics(SM_CYSCREEN ))
{
if( yanchor )
y -= height + yanchor;
if( y + height > SYSMETRICS_CYSCREEN )
y = SYSMETRICS_CYSCREEN - height;
if( y + height > GetSystemMetrics(SM_CYSCREEN ))
y = GetSystemMetrics(SM_CYSCREEN) - height;
}
if( y < 0 ) y = 0;
if( TWEAK_WineLook == WIN31_LOOK )
{
width += POPUP_XSHADE * SYSMETRICS_CXBORDER; /* add space for shading */
height += POPUP_YSHADE * SYSMETRICS_CYBORDER;
width += POPUP_XSHADE * GetSystemMetrics(SM_CXBORDER); /* add space for shading */
height += POPUP_YSHADE * GetSystemMetrics(SM_CYBORDER);
}
/* 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 );
rect.top = rect.bottom;
rect.right = SYSMETRICS_CXSIZE;
rect.bottom = SYSMETRICS_CYSIZE;
rect.right = GetSystemMetrics(SM_CXSIZE);
rect.bottom = GetSystemMetrics(SM_CYSIZE);
}
else
{
......@@ -3068,7 +3067,7 @@ UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
hdc = GetDCEx( hwnd, 0, DCX_CACHE | DCX_WINDOW );
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 );
ReleaseDC( hwnd, hdc );
retvalue = lppop->Height;
......
......@@ -6,7 +6,6 @@
*/
#include "wine/winuser16.h"
#include "sysmetrics.h"
#include "scroll.h"
#include "heap.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->top = wndPtr->rectClient.bottom - wndPtr->rectWindow.top;
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) {
lprect->left--;
lprect->right++;
......@@ -193,7 +192,7 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
case SB_VERT:
lprect->left = wndPtr->rectClient.right - wndPtr->rectWindow.left;
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;
if(wndPtr->dwStyle & WS_BORDER) {
lprect->top--;
......@@ -216,7 +215,7 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
if (vertical) pixels = lprect->bottom - lprect->top;
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)
*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 );
*arrowSize = SYSMETRICS_CXVSCROLL;
pixels -= (2 * (SYSMETRICS_CXVSCROLL - SCROLL_ARROW_THUMB_OVERLAP));
*arrowSize = GetSystemMetrics(SM_CXVSCROLL);
pixels -= (2 * (GetSystemMetrics(SM_CXVSCROLL) - SCROLL_ARROW_THUMB_OVERLAP));
if (info->Page)
{
*thumbSize = pixels * info->Page / (info->MaxVal-info->MinVal+1);
if (*thumbSize < SCROLL_MIN_THUMB) *thumbSize = SCROLL_MIN_THUMB;
}
else *thumbSize = SYSMETRICS_CXVSCROLL;
else *thumbSize = GetSystemMetrics(SM_CXVSCROLL);
if (((pixels -= *thumbSize ) < 0) ||
((info->flags & ESB_DISABLE_BOTH) == ESB_DISABLE_BOTH))
......@@ -271,7 +270,7 @@ static UINT SCROLL_GetThumbVal( SCROLLBAR_INFO *infoPtr, RECT *rect,
INT thumbSize;
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;
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);
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;
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 (!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 ? arrowSize : rect->bottom-rect->top,
hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL,
GetSystemMetrics(SM_CXVSCROLL),GetSystemMetrics(SM_CYHSCROLL),
SRCCOPY );
SelectObject( hdcMem, vertical ?
......@@ -400,13 +399,13 @@ static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr,
StretchBlt( hdc, rect->left, rect->bottom - arrowSize,
rect->right - rect->left, arrowSize,
hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL,
GetSystemMetrics(SM_CXVSCROLL),GetSystemMetrics(SM_CYHSCROLL),
SRCCOPY );
else
StretchBlt( hdc, rect->right - arrowSize, rect->top,
arrowSize, rect->bottom - rect->top,
hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL,
GetSystemMetrics(SM_CXVSCROLL), GetSystemMetrics(SM_CYHSCROLL),
SRCCOPY );
SelectObject( hdcMem, hbmpPrev );
DeleteDC( hdcMem );
......@@ -873,23 +872,23 @@ LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
{
if (lpCreat->style & SBS_LEFTALIGN)
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)
MoveWindow( hwnd,
lpCreat->x+lpCreat->cx-SYSMETRICS_CXVSCROLL-1,
lpCreat->x+lpCreat->cx-GetSystemMetrics(SM_CXVSCROLL)-1,
lpCreat->y,
SYSMETRICS_CXVSCROLL+1, lpCreat->cy, FALSE );
GetSystemMetrics(SM_CXVSCROLL)+1, lpCreat->cy, FALSE );
}
else /* SBS_HORZ */
{
if (lpCreat->style & SBS_TOPALIGN)
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)
MoveWindow( hwnd,
lpCreat->x,
lpCreat->y+lpCreat->cy-SYSMETRICS_CYHSCROLL-1,
lpCreat->cx, SYSMETRICS_CYHSCROLL+1, FALSE );
lpCreat->y+lpCreat->cy-GetSystemMetrics(SM_CYHSCROLL)-1,
lpCreat->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
}
}
if (!hUpArrow) SCROLL_LoadBitmaps();
......
......@@ -13,7 +13,6 @@
#include "wine/winuser16.h"
#include "ldt.h"
#include "heap.h"
#include "message.h"
#include "commdlg.h"
#include "resource.h"
#include "dialog.h"
......
......@@ -11,7 +11,6 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "ldt.h"
#include "message.h"
#include "commdlg.h"
#include "resource.h"
#include "dialog.h"
......
......@@ -13,7 +13,6 @@
#include "wine/winuser16.h"
#include "ldt.h"
#include "heap.h"
#include "message.h"
#include "commdlg.h"
#include "resource.h"
#include "dialog.h"
......
......@@ -13,7 +13,6 @@
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "ldt.h"
#include "message.h"
#include "commdlg.h"
#include "resource.h"
#include "dialog.h"
......
......@@ -3,6 +3,9 @@
*
*/
#include <string.h>
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/winuser16.h"
#include "wine/winbase16.h"
#include "neexe.h"
......@@ -10,12 +13,9 @@
#include "module.h"
#include "heap.h"
#include "debug.h"
#include "sysmetrics.h"
#include "winversion.h"
#include "shellapi.h"
#include "shlobj.h"
#include "pidl.h"
#include "shell32_main.h"
......@@ -276,7 +276,7 @@ HGLOBAL WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON * RetPtr, UINT nI
if( lpiID == NULL ) /* *.ico */
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);
}
......
......@@ -7,137 +7,7 @@
#ifndef __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 short sysMetrics[SM_CMETRICS+1];
extern void SYSCOLOR_Init(void); /* syscolor.c */
#endif /* __WINE_SYSMETRICS_H */
......@@ -19,7 +19,6 @@
#include "neexe.h"
#include "dlgs.h"
#include "cursoricon.h"
#include "sysmetrics.h"
#include "shellapi.h"
#include "shlobj.h"
#include "debugtools.h"
......@@ -829,7 +828,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
/* found */
cid = (CURSORICONDIR*)igdata;
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);
......@@ -859,7 +858,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
RetPtr[i]=0;
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 */
}
......
......@@ -14,7 +14,6 @@
#include "bitmap.h"
#include "heap.h"
#include "global.h"
#include "sysmetrics.h"
#include "cursoricon.h"
#include "debugtools.h"
#include "monitor.h"
......@@ -428,11 +427,11 @@ HANDLE WINAPI LoadImageW( HINSTANCE hinst, LPCWSTR name, UINT type,
}
if (loadflags & LR_DEFAULTSIZE) {
if (type == IMAGE_ICON) {
if (!desiredx) desiredx = SYSMETRICS_CXICON;
if (!desiredy) desiredy = SYSMETRICS_CYICON;
if (!desiredx) desiredx = GetSystemMetrics(SM_CXICON);
if (!desiredy) desiredy = GetSystemMetrics(SM_CYICON);
} else if (type == IMAGE_CURSOR) {
if (!desiredx) desiredx = SYSMETRICS_CXCURSOR;
if (!desiredy) desiredy = SYSMETRICS_CYCURSOR;
if (!desiredx) desiredx = GetSystemMetrics(SM_CXCURSOR);
if (!desiredy) desiredy = GetSystemMetrics(SM_CYCURSOR);
}
}
if (loadflags & LR_LOADFROMFILE) loadflags &= ~LR_SHARED;
......
......@@ -40,7 +40,6 @@
#include "cursoricon.h"
#include "dc.h"
#include "gdi.h"
#include "sysmetrics.h"
#include "global.h"
#include "module.h"
#include "debugtools.h"
......@@ -885,7 +884,8 @@ HCURSOR16 CURSORICON_IconToCursor(HICON16 hIcon, BOOL bSemiTransparent)
if( !hRet ) /* fall back on default drag cursor */
hRet = CURSORICON_Copy( pTask->hInstance ,
CURSORICON_Load(0,MAKEINTRESOURCEW(OCR_DRAGOBJECT),
SYSMETRICS_CXCURSOR, SYSMETRICS_CYCURSOR, 1, TRUE, 0) );
GetSystemMetrics(SM_CXCURSOR),
GetSystemMetrics(SM_CYCURSOR), 1, TRUE, 0) );
}
return hRet;
......@@ -1454,8 +1454,8 @@ INT WINAPI LookupIconIdFromDirectoryEx( LPBYTE dir, BOOL bIcon,
INT16 WINAPI LookupIconIdFromDirectory16( LPBYTE dir, BOOL16 bIcon )
{
return LookupIconIdFromDirectoryEx16( dir, bIcon,
bIcon ? SYSMETRICS_CXICON : SYSMETRICS_CXCURSOR,
bIcon ? SYSMETRICS_CYICON : SYSMETRICS_CYCURSOR, bIcon ? 0 : LR_MONOCHROME );
bIcon ? GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXCURSOR),
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 )
{
return LookupIconIdFromDirectoryEx( dir, bIcon,
bIcon ? SYSMETRICS_CXICON : SYSMETRICS_CXCURSOR,
bIcon ? SYSMETRICS_CYICON : SYSMETRICS_CYCURSOR, bIcon ? 0 : LR_MONOCHROME );
bIcon ? GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXCURSOR),
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:
return (WORD)LookupIconIdFromDirectoryEx16( lpDir, FALSE,
SYSMETRICS_CXCURSOR, SYSMETRICS_CYCURSOR, LR_MONOCHROME );
GetSystemMetrics(SM_CXCURSOR), GetSystemMetrics(SM_CYCURSOR), LR_MONOCHROME );
case RT_ICON16:
return (WORD)LookupIconIdFromDirectoryEx16( lpDir, TRUE,
SYSMETRICS_CXICON, SYSMETRICS_CYICON, 0 );
GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0 );
default:
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 );
hMemObj = CURSORICON_CreateFromResource( hModule, hMemObj, bits,
SizeofResource16(hModule, hRsrc), TRUE, 0x00030000,
SYSMETRICS_CXICON, SYSMETRICS_CYICON, LR_DEFAULTCOLOR );
GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR );
}
return hMemObj;
}
......@@ -1542,7 +1542,7 @@ HGLOBAL16 WINAPI LoadDIBCursorHandler16( HGLOBAL16 hMemObj, HMODULE16 hModule, H
LPBYTE bits = (LPBYTE)GlobalLock16( hMemObj );
hMemObj = CURSORICON_CreateFromResource( hModule, hMemObj, bits,
SizeofResource16(hModule, hRsrc), FALSE, 0x00030000,
SYSMETRICS_CXCURSOR, SYSMETRICS_CYCURSOR, LR_MONOCHROME );
GetSystemMetrics(SM_CXCURSOR), GetSystemMetrics(SM_CYCURSOR), LR_MONOCHROME );
}
return hMemObj;
}
......
......@@ -26,7 +26,6 @@
#include "gdi.h"
#include "region.h"
#include "heap.h"
#include "sysmetrics.h"
#include "local.h"
#include "debug.h"
#include "wine/winuser16.h"
......@@ -828,7 +827,7 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
}
else
if ((hwnd == GetDesktopWindow()) && !DESKTOP_IsSingleWindow())
hrgnVisible = CreateRectRgn( 0, 0, SYSMETRICS_CXSCREEN, SYSMETRICS_CYSCREEN );
hrgnVisible = CreateRectRgn( 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN) );
else
{
hrgnVisible = DCE_GetVisRgn( hwnd, flags, 0, 0 );
......
......@@ -13,7 +13,6 @@
#include "nonclient.h"
#include "winpos.h"
#include "dce.h"
#include "sysmetrics.h"
#include "debug.h"
#include "spy.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 )
{
int x = (wndPtr->rectWindow.right - wndPtr->rectWindow.left -
SYSMETRICS_CXICON)/2;
GetSystemMetrics(SM_CXICON))/2;
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",
ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom );
DrawIcon( hdc, x, y, wndPtr->class->hIcon );
......
......@@ -20,7 +20,6 @@
#include "user.h"
#include "winproc.h"
#include "message.h"
#include "sysmetrics.h"
#include "debug.h"
DEFAULT_DEBUG_CHANNEL(dialog)
......@@ -628,8 +627,8 @@ HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
{
if (template.style & DS_CENTER)
{
rect.left = (SYSMETRICS_CXSCREEN - rect.right) / 2;
rect.top = (SYSMETRICS_CYSCREEN - rect.bottom) / 2;
rect.left = (GetSystemMetrics(SM_CXSCREEN) - rect.right) / 2;
rect.top = (GetSystemMetrics(SM_CYSCREEN) - rect.bottom) / 2;
}
else
{
......@@ -645,10 +644,10 @@ HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
/* try to fit it into the desktop */
if( (dX = rect.left + rect.right + SYSMETRICS_CXDLGFRAME
- SYSMETRICS_CXSCREEN) > 0 ) rect.left -= dX;
if( (dY = rect.top + rect.bottom + SYSMETRICS_CYDLGFRAME
- SYSMETRICS_CYSCREEN) > 0 ) rect.top -= dY;
if( (dX = rect.left + rect.right + GetSystemMetrics(SM_CXDLGFRAME)
- GetSystemMetrics(SM_CXSCREEN)) > 0 ) rect.left -= dX;
if( (dY = rect.top + rect.bottom + GetSystemMetrics(SM_CYDLGFRAME)
- GetSystemMetrics(SM_CYSCREEN)) > 0 ) rect.top -= dY;
if( rect.left < 0 ) rect.left = 0;
if( rect.top < 0 ) rect.top = 0;
}
......
......@@ -32,7 +32,6 @@
#include "message.h"
#include "display.h"
#include "mouse.h"
#include "sysmetrics.h"
DEFAULT_DEBUG_CHANNEL(dinput)
......@@ -797,8 +796,8 @@ static void WINAPI dinput_mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
extra = (DWORD)wme->hWnd;
assert( dwFlags & MOUSEEVENTF_ABSOLUTE );
posX = (dx * SYSMETRICS_CXSCREEN) >> 16;
posY = (dy * SYSMETRICS_CYSCREEN) >> 16;
posX = (dx * GetSystemMetrics(SM_CXSCREEN)) >> 16;
posY = (dy * GetSystemMetrics(SM_CYSCREEN)) >> 16;
} else {
ERR(dinput, "Mouse event not supported...\n");
return ;
......
......@@ -24,8 +24,6 @@
#include "keyboard.h"
#include "mouse.h"
#include "message.h"
#include "sysmetrics.h"
#include "debugtools.h"
#include "debugtools.h"
#include "struct32.h"
#include "winerror.h"
......@@ -169,8 +167,8 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
extra = (DWORD)wme->hWnd;
assert( dwFlags & MOUSEEVENTF_ABSOLUTE );
posX = (dx * SYSMETRICS_CXSCREEN) >> 16;
posY = (dy * SYSMETRICS_CYSCREEN) >> 16;
posX = (dx * GetSystemMetrics(SM_CXSCREEN)) >> 16;
posY = (dy * GetSystemMetrics(SM_CYSCREEN)) >> 16;
}
else
{
......@@ -184,8 +182,8 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
{
if ( dwFlags & MOUSEEVENTF_ABSOLUTE )
{
posX = (dx * SYSMETRICS_CXSCREEN) >> 16;
posY = (dy * SYSMETRICS_CYSCREEN) >> 16;
posX = (dx * GetSystemMetrics(SM_CXSCREEN)) >> 16;
posY = (dy * GetSystemMetrics(SM_CYSCREEN)) >> 16;
}
else
{
......
......@@ -24,7 +24,6 @@
#include "menu.h"
#include "resource.h"
#include "struct32.h"
#include "sysmetrics.h"
#include "tweak.h"
#include "debug.h"
......@@ -654,11 +653,11 @@ static HBITMAP16 CreateMDIMenuBitmap(void)
HANDLE16 hobjSrc, hobjDest;
hobjSrc = SelectObject(hDCSrc, hbClose);
hbCopy = CreateCompatibleBitmap(hDCSrc,SYSMETRICS_CXSIZE,SYSMETRICS_CYSIZE);
hbCopy = CreateCompatibleBitmap(hDCSrc,GetSystemMetrics(SM_CXSIZE),GetSystemMetrics(SM_CYSIZE));
hobjDest = SelectObject(hDCDest, hbCopy);
BitBlt(hDCDest, 0, 0, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE,
hDCSrc, SYSMETRICS_CXSIZE, 0, SRCCOPY);
BitBlt(hDCDest, 0, 0, GetSystemMetrics(SM_CXSIZE), GetSystemMetrics(SM_CYSIZE),
hDCSrc, GetSystemMetrics(SM_CXSIZE), 0, SRCCOPY);
SelectObject(hDCSrc, hobjSrc);
DeleteObject(hbClose);
......@@ -666,8 +665,8 @@ static HBITMAP16 CreateMDIMenuBitmap(void)
hobjSrc = SelectObject( hDCDest, GetStockObject(BLACK_PEN) );
MoveToEx( hDCDest, SYSMETRICS_CXSIZE - 1, 0, NULL );
LineTo( hDCDest, SYSMETRICS_CXSIZE - 1, SYSMETRICS_CYSIZE - 1);
MoveToEx( hDCDest, GetSystemMetrics(SM_CXSIZE) - 1, 0, NULL );
LineTo( hDCDest, GetSystemMetrics(SM_CXSIZE) - 1, GetSystemMetrics(SM_CYSIZE) - 1);
SelectObject(hDCDest, hobjSrc );
SelectObject(hDCDest, hobjDest);
......@@ -699,7 +698,8 @@ static LONG MDICascade(WND* clientWnd, MDICLIENTINFO *ci)
INT delta = 0, n = 0;
POINT pos[2];
if( total < ci->nActiveChildren )
delta = SYSMETRICS_CYICONSPACING + SYSMETRICS_CYICON;
delta = GetSystemMetrics(SM_CYICONSPACING) +
GetSystemMetrics(SM_CYICON);
/* walk the list (backwards) and move windows */
while (*ppWnd) ppWnd++;
......@@ -765,8 +765,8 @@ static void MDITile( WND* wndClient, MDICLIENTINFO *ci, WPARAM wParam )
if( total != ci->nActiveChildren)
{
y = rect.bottom - 2 * SYSMETRICS_CYICONSPACING - SYSMETRICS_CYICON;
rect.bottom = ( y - SYSMETRICS_CYICON < rect.top )? rect.bottom: y;
y = rect.bottom - 2 * GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON);
rect.bottom = ( y - GetSystemMetrics(SM_CYICON) < rect.top )? rect.bottom: y;
}
ysize = rect.bottom / rows;
......@@ -1965,14 +1965,14 @@ void WINAPI ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam,
GetScrollRange(hWnd,SB_HORZ,&minPos,&maxPos);
curPos = GetScrollPos(hWnd,SB_HORZ);
length = (wndPtr->rectClient.right - wndPtr->rectClient.left)/2;
shift = SYSMETRICS_CYHSCROLL;
shift = GetSystemMetrics(SM_CYHSCROLL);
}
else if( uMsg == WM_VSCROLL )
{
GetScrollRange(hWnd,SB_VERT,&minPos,&maxPos);
curPos = GetScrollPos(hWnd,SB_VERT);
length = (wndPtr->rectClient.bottom - wndPtr->rectClient.top)/2;
shift = SYSMETRICS_CXVSCROLL;
shift = GetSystemMetrics(SM_CXVSCROLL);
}
else
{
......
......@@ -14,7 +14,6 @@
#include "message.h"
#include "winerror.h"
#include "win.h"
#include "sysmetrics.h"
#include "heap.h"
#include "hook.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) &&
(msg->time - dblclk_time_limit < doubleClickSpeed) &&
(abs(msg->pt.x - clk_pos.x) < SYSMETRICS_CXDOUBLECLK/2) &&
(abs(msg->pt.y - clk_pos.y) < SYSMETRICS_CYDOUBLECLK/2))
(abs(msg->pt.x - clk_pos.x) < GetSystemMetrics(SM_CXDOUBLECLK)/2) &&
(abs(msg->pt.y - clk_pos.y) < GetSystemMetrics(SM_CYDOUBLECLK)/2))
{
message += (WM_LBUTTONDBLCLK - WM_LBUTTONDOWN);
mouseClick++; /* == 2 */
......
......@@ -16,7 +16,6 @@
#include "gdi.h"
#include "dce.h"
#include "region.h"
#include "sysmetrics.h"
#include "debug.h"
DEFAULT_DEBUG_CHANNEL(scroll)
......
......@@ -10,10 +10,9 @@
#include "winuser.h"
#include "monitor.h"
#include "options.h"
#include "sysmetrics.h"
#include "tweak.h"
short sysMetrics[SM_CMETRICS+1];
static short sysMetrics[SM_CMETRICS+1];
/***********************************************************************
* SYSMETRICS_Init
......
......@@ -14,7 +14,6 @@
#include "heap.h"
#include "user.h"
#include "dce.h"
#include "sysmetrics.h"
#include "cursoricon.h"
#include "hook.h"
#include "menu.h"
......@@ -641,8 +640,8 @@ BOOL WIN_CreateDesktopWindow(void)
pWndDesktop->hInstance = 0;
pWndDesktop->rectWindow.left = 0;
pWndDesktop->rectWindow.top = 0;
pWndDesktop->rectWindow.right = SYSMETRICS_CXSCREEN;
pWndDesktop->rectWindow.bottom = SYSMETRICS_CYSCREEN;
pWndDesktop->rectWindow.right = GetSystemMetrics(SM_CXSCREEN);
pWndDesktop->rectWindow.bottom = GetSystemMetrics(SM_CYSCREEN);
pWndDesktop->rectClient = pWndDesktop->rectWindow;
pWndDesktop->text = NULL;
pWndDesktop->hmemTaskQ = GetFastQueue16();
......
......@@ -7,7 +7,6 @@
#include <string.h>
#include "wine/winuser16.h"
#include "sysmetrics.h"
#include "heap.h"
#include "module.h"
#include "user.h"
......@@ -126,12 +125,12 @@ static POINT16 WINPOS_FindIconPos( WND* wndPtr, POINT16 pt )
short x, y, xspacing, yspacing;
GetClientRect16( wndPtr->parent->hwndSelf, &rectParent );
if ((pt.x >= rectParent.left) && (pt.x + SYSMETRICS_CXICON < rectParent.right) &&
(pt.y >= rectParent.top) && (pt.y + SYSMETRICS_CYICON < rectParent.bottom))
if ((pt.x >= rectParent.left) && (pt.x + GetSystemMetrics(SM_CXICON) < rectParent.right) &&
(pt.y >= rectParent.top) && (pt.y + GetSystemMetrics(SM_CYICON) < rectParent.bottom))
return pt; /* The icon already has a suitable position */
xspacing = SYSMETRICS_CXICONSPACING;
yspacing = SYSMETRICS_CYICONSPACING;
xspacing = GetSystemMetrics(SM_CXICONSPACING);
yspacing = GetSystemMetrics(SM_CYICONSPACING);
y = rectParent.bottom;
for (;;)
......@@ -155,8 +154,8 @@ static POINT16 WINPOS_FindIconPos( WND* wndPtr, POINT16 pt )
WIN_ReleaseWndPtr(childPtr);
if (!childPtr) /* No window was found, so it's OK for us */
{
pt.x = x + (xspacing - SYSMETRICS_CXICON) / 2;
pt.y = y - (yspacing + SYSMETRICS_CYICON) / 2;
pt.x = x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2;
pt.y = y - (yspacing + GetSystemMetrics(SM_CYICON)) / 2;
return pt;
}
}
......@@ -184,8 +183,8 @@ UINT WINAPI ArrangeIconicWindows( HWND parent )
GetClientRect( parent, &rectParent );
x = rectParent.left;
y = rectParent.bottom;
xspacing = SYSMETRICS_CXICONSPACING;
yspacing = SYSMETRICS_CYICONSPACING;
xspacing = GetSystemMetrics(SM_CXICONSPACING);
yspacing = GetSystemMetrics(SM_CYICONSPACING);
hwndChild = GetWindow( parent, GW_CHILD );
while (hwndChild)
......@@ -196,8 +195,8 @@ UINT WINAPI ArrangeIconicWindows( HWND parent )
WINPOS_ShowIconTitle( wndPtr, FALSE );
SetWindowPos( hwndChild, 0, x + (xspacing - SYSMETRICS_CXICON) / 2,
y - yspacing - SYSMETRICS_CYICON/2, 0, 0,
SetWindowPos( hwndChild, 0, x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2,
y - yspacing - GetSystemMetrics(SM_CYICON)/2, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE );
if( IsWindow(hwndChild) )
WINPOS_ShowIconTitle(wndPtr , TRUE );
......@@ -1080,31 +1079,31 @@ void WINPOS_GetMinMaxInfo( WND *wndPtr, POINT *maxSize, POINT *maxPos,
/* Compute default values */
MinMax.ptMaxSize.x = SYSMETRICS_CXSCREEN;
MinMax.ptMaxSize.y = SYSMETRICS_CYSCREEN;
MinMax.ptMinTrackSize.x = SYSMETRICS_CXMINTRACK;
MinMax.ptMinTrackSize.y = SYSMETRICS_CYMINTRACK;
MinMax.ptMaxTrackSize.x = SYSMETRICS_CXSCREEN;
MinMax.ptMaxTrackSize.y = SYSMETRICS_CYSCREEN;
MinMax.ptMaxSize.x = GetSystemMetrics(SM_CXSCREEN);
MinMax.ptMaxSize.y = GetSystemMetrics(SM_CYSCREEN);
MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK);
MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK);
MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXSCREEN);
MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYSCREEN);
if (wndPtr->flags & WIN_MANAGED) xinc = yinc = 0;
else if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
{
xinc = SYSMETRICS_CXDLGFRAME;
yinc = SYSMETRICS_CYDLGFRAME;
xinc = GetSystemMetrics(SM_CXDLGFRAME);
yinc = GetSystemMetrics(SM_CYDLGFRAME);
}
else
{
xinc = yinc = 0;
if (HAS_THICKFRAME(wndPtr->dwStyle))
{
xinc += SYSMETRICS_CXFRAME;
yinc += SYSMETRICS_CYFRAME;
xinc += GetSystemMetrics(SM_CXFRAME);
yinc += GetSystemMetrics(SM_CYFRAME);
}
if (wndPtr->dwStyle & WS_BORDER)
{
xinc += SYSMETRICS_CXBORDER;
yinc += SYSMETRICS_CYBORDER;
xinc += GetSystemMetrics(SM_CXBORDER);
yinc += GetSystemMetrics(SM_CYBORDER);
}
}
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 );
SetRect16( lpRect, lpPos->ptIconPos.x, lpPos->ptIconPos.y,
SYSMETRICS_CXICON, SYSMETRICS_CYICON );
GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON) );
swpFlags |= SWP_NOCOPYBITS;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment