Commit 9f3eb19a authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Removed use of win.h, sysmetrics.h and associated WINE USER internal

variables. Added missing infoPtr->Buddy = hwndBud; in updown.c
parent 654ee2c1
......@@ -18,8 +18,8 @@
#include <stdlib.h> /* atoi */
#include <ctype.h>
#include "winbase.h"
#include "commctrl.h"
#include "heap.h"
#include "debug.h"
DEFAULT_DEBUG_CHANNEL(commctrl)
......
......@@ -21,9 +21,9 @@
#include <string.h>
#include "winbase.h"
#include "wingdi.h"
#include "commctrl.h"
#include "rebar.h"
#include "sysmetrics.h"
#include "debug.h"
DEFAULT_DEBUG_CHANNEL(rebar)
......@@ -382,7 +382,7 @@ REBAR_ForceResize (HWND hwnd)
rc.bottom = infoPtr->calcSize.cy;
if (GetWindowLongA (hwnd, GWL_STYLE) & WS_BORDER) {
InflateRect (&rc, sysMetrics[SM_CXEDGE], sysMetrics[SM_CYEDGE]);
InflateRect (&rc, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE));
}
SetWindowPos (hwnd, 0, 0, 0,
......@@ -761,7 +761,8 @@ REBAR_GetBarHeight (HWND hwnd, WPARAM wParam, LPARAM lParam)
nHeight = infoPtr->calcSize.cy;
if (GetWindowLongA (hwnd, GWL_STYLE) & WS_BORDER)
nHeight += (2 * sysMetrics[SM_CYEDGE]);
nHeight += (2 * GetSystemMetrics(SM_CYEDGE));
FIXME (rebar, "height = %d\n", nHeight);
......@@ -1669,10 +1670,10 @@ inline static LRESULT
REBAR_NCCalcSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
if (GetWindowLongA (hwnd, GWL_STYLE) & WS_BORDER) {
((LPRECT)lParam)->left += sysMetrics[SM_CXEDGE];
((LPRECT)lParam)->top += sysMetrics[SM_CYEDGE];
((LPRECT)lParam)->right -= sysMetrics[SM_CXEDGE];
((LPRECT)lParam)->bottom -= sysMetrics[SM_CYEDGE];
((LPRECT)lParam)->left += GetSystemMetrics(SM_CXEDGE);
((LPRECT)lParam)->top += GetSystemMetrics(SM_CYEDGE);
((LPRECT)lParam)->right -= GetSystemMetrics(SM_CXEDGE);
((LPRECT)lParam)->bottom -= GetSystemMetrics(SM_CYEDGE);
}
return 0;
......
......@@ -28,8 +28,9 @@
#include <string.h>
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "commctrl.h"
#include "sysmetrics.h"
#include "cache.h"
#include "comctl32.h"
#include "toolbar.h"
......@@ -1186,7 +1187,7 @@ TOOLBAR_AutoSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
uPosFlags |= SWP_NOMOVE;
if (!(dwStyle & CCS_NODIVIDER))
cy += sysMetrics[SM_CYEDGE];
cy += GetSystemMetrics(SM_CYEDGE);
infoPtr->bAutoSize = TRUE;
SetWindowPos (hwnd, HWND_TOP, parent_rect.left, parent_rect.top,
......@@ -2756,7 +2757,7 @@ inline static LRESULT
TOOLBAR_NCCalcSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
if (!(GetWindowLongA (hwnd, GWL_STYLE) & CCS_NODIVIDER))
((LPRECT)lParam)->top += sysMetrics[SM_CYEDGE];
((LPRECT)lParam)->top += GetSystemMetrics(SM_CYEDGE);
return DefWindowProcA (hwnd, WM_NCCALCSIZE, wParam, lParam);
}
......@@ -2914,7 +2915,7 @@ TOOLBAR_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
}
if (!(dwStyle & CCS_NODIVIDER))
cy += sysMetrics[SM_CYEDGE];
cy += GetSystemMetrics(SM_CYEDGE);
SetWindowPos (hwnd, 0, parent_rect.left, parent_rect.top,
cx, cy, uPosFlags | SWP_NOZORDER);
......
......@@ -32,7 +32,8 @@
#include <stdlib.h>
#include <string.h>
#include "win.h"
#include "winbase.h"
#include "winuser.h"
#include "commctrl.h"
#include "winnls.h"
#include "updown.h"
......@@ -372,6 +373,8 @@ static BOOL UPDOWN_SetBuddy (HWND hwnd, HWND hwndBud)
if(!(dwStyle & (UDS_ALIGNLEFT | UDS_ALIGNRIGHT)))
return TRUE;
infoPtr->Buddy = hwndBud;
/* Get the rect of the buddy relative to its parent */
GetWindowRect(infoPtr->Buddy, &budRect);
MapWindowPoints(HWND_DESKTOP, GetParent(infoPtr->Buddy),
......@@ -684,12 +687,8 @@ LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam,
break;
/*If we released the mouse and our buddy is an edit */
/* we must select all text in it. */
{
WND *tmpWnd = WIN_FindWndPtr(infoPtr->Buddy);
if(WIDGETS_IsControl(tmpWnd, BIC32_EDIT))
SendMessageA(infoPtr->Buddy, EM_SETSEL, 0, MAKELONG(0, -1));
WIN_ReleaseWndPtr(tmpWnd);
}
if (!lstrcmpA (infoPtr->szBuddyClass, "Edit"))
SendMessageA(infoPtr->Buddy, EM_SETSEL, 0, MAKELONG(0, -1));
break;
case WM_LBUTTONDOWN:
......
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