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