mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- Get the WS_EX_STATICEDGE style working.
- Remove a WS_EX_STATICEDGE hack from Explorer. svn path=/trunk/; revision=8977
This commit is contained in:
parent
0c33860003
commit
c89da97139
2 changed files with 22 additions and 16 deletions
|
@ -314,7 +314,19 @@ DefWndNCPaint(HWND hWnd, HRGN hRgn)
|
|||
} else
|
||||
if (ExStyle & WS_EX_STATICEDGE)
|
||||
{
|
||||
#if 0
|
||||
DrawEdge(hDC, &CurrentRect, BDR_SUNKENINNER, BF_RECT | BF_ADJUST | BF_FLAT);
|
||||
#else
|
||||
SelectObject(hDC, GetSysColorBrush(COLOR_BTNSHADOW));
|
||||
PatBlt(hDC, CurrentRect.left, CurrentRect.top, CurrentRect.right - CurrentRect.left, 1, PATCOPY);
|
||||
PatBlt(hDC, CurrentRect.left, CurrentRect.top, 1, CurrentRect.bottom - CurrentRect.top, PATCOPY);
|
||||
|
||||
SelectObject(hDC, GetSysColorBrush(COLOR_BTNHIGHLIGHT));
|
||||
PatBlt(hDC, CurrentRect.left, CurrentRect.bottom - 1, CurrentRect.right - CurrentRect.left, 1, PATCOPY);
|
||||
PatBlt(hDC, CurrentRect.right - 1, CurrentRect.top, 1, CurrentRect.bottom - CurrentRect.top, PATCOPY);
|
||||
|
||||
InflateRect(&CurrentRect, -1, -1);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Firstly the "thick" frame */
|
||||
|
@ -508,8 +520,16 @@ DefWndNCCalcSize(HWND hWnd, BOOL CalcSizeStruct, RECT *Rect)
|
|||
{
|
||||
HMENU menu = GetMenu(hWnd);
|
||||
|
||||
UserGetWindowBorders(Style, ExStyle, &WindowBorders, FALSE);
|
||||
InflateRect(Rect, -WindowBorders.cx, -WindowBorders.cy);
|
||||
if (UserHasWindowEdge(Style, ExStyle))
|
||||
{
|
||||
UserGetWindowBorders(Style, ExStyle, &WindowBorders, FALSE);
|
||||
InflateRect(Rect, -WindowBorders.cx, -WindowBorders.cy);
|
||||
} else
|
||||
if (ExStyle & WS_EX_STATICEDGE)
|
||||
{
|
||||
InflateRect(Rect, -1, -1);
|
||||
}
|
||||
|
||||
if ((Style & WS_CAPTION) == WS_CAPTION)
|
||||
{
|
||||
if (ExStyle & WS_EX_TOOLWINDOW)
|
||||
|
|
|
@ -328,15 +328,9 @@ HWND NotifyArea::Create(HWND hwndParent)
|
|||
|
||||
ClientRect clnt(hwndParent);
|
||||
|
||||
#ifndef _ROS_
|
||||
return Window::Create(WINDOW_CREATOR(NotifyArea), WS_EX_STATICEDGE,
|
||||
wcTrayNotify, TITLE_TRAYNOTIFY, WS_CHILD|WS_VISIBLE,
|
||||
clnt.right-(NOTIFYAREA_WIDTH_DEF+1), 1, NOTIFYAREA_WIDTH_DEF, clnt.bottom-2, hwndParent);
|
||||
#else
|
||||
return Window::Create(WINDOW_CREATOR(NotifyArea), 0,
|
||||
wcTrayNotify, TITLE_TRAYNOTIFY, WS_CHILD|WS_VISIBLE,
|
||||
clnt.right-(NOTIFYAREA_WIDTH_DEF+1), 1, NOTIFYAREA_WIDTH_DEF, clnt.bottom-2, hwndParent);
|
||||
#endif
|
||||
}
|
||||
|
||||
LRESULT NotifyArea::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||
|
@ -604,10 +598,6 @@ void NotifyArea::Paint()
|
|||
// first fill with the background color
|
||||
FillRect(canvas, &canvas.rcPaint, GetSysColorBrush(COLOR_BTNFACE));
|
||||
|
||||
#ifdef _ROS_
|
||||
DrawEdge(canvas, ClientRect(_hwnd), BDR_SUNKENOUTER, BF_RECT);
|
||||
#endif
|
||||
|
||||
// draw icons
|
||||
int x = 2;
|
||||
int y = 3;
|
||||
|
@ -1210,10 +1200,6 @@ void ClockWindow::Paint()
|
|||
{
|
||||
PaintCanvas canvas(_hwnd);
|
||||
|
||||
#ifdef _ROS_
|
||||
DrawEdge(canvas, ClientRect(_hwnd), BDR_SUNKENOUTER, BF_TOP|BF_RIGHT);
|
||||
#endif
|
||||
|
||||
BkMode bkmode(canvas, TRANSPARENT);
|
||||
FontSelection font(canvas, GetStockFont(ANSI_VAR_FONT));
|
||||
|
||||
|
|
Loading…
Reference in a new issue