Commit 7203ee66 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Use PS_ALTERNATE rather than PS_DOT.

Use Rectangle to draw focus rectangles.
parent b8d450f9
......@@ -3650,7 +3650,7 @@ static VOID LISTVIEW_Refresh(HWND hwnd, HDC hdc)
hOldFont = SelectObject(hdc, infoPtr->hFont);
/* select the dotted pen (for drawing the focus box) */
hPen = CreatePen(PS_DOT, 1, 0);
hPen = CreatePen(PS_ALTERNATE, 1, 0);
hOldPen = SelectObject(hdc, hPen);
/* select transparent brush (for drawing the focus box) */
......
......@@ -366,7 +366,7 @@ static void MONTHCAL_DrawDay(HDC hdc, MONTHCAL_INFO *infoPtr, int day, int month
/* draw a rectangle around the currently selected days text */
if((day==infoPtr->curSelDay) && (month==infoPtr->currentMonth)) {
hNewPen = CreatePen(PS_DOT, 0, GetSysColor(COLOR_WINDOWTEXT) );
hNewPen = CreatePen(PS_ALTERNATE, 0, GetSysColor(COLOR_WINDOWTEXT) );
hbr = GetSysColorBrush(COLOR_WINDOWTEXT);
FrameRect(hdc, &r, hbr);
SelectObject(hdc, hOldPen);
......
......@@ -1594,7 +1594,7 @@ static void TAB_DrawItem(
HPEN hbPen = GetSysColorPen (COLOR_3DDKSHADOW);
HPEN hShade = GetSysColorPen (COLOR_BTNSHADOW);
HPEN hfocusPen = CreatePen(PS_DOT, 1, GetSysColor(COLOR_BTNTEXT));
HPEN hfocusPen = CreatePen(PS_ALTERNATE, 1, GetSysColor(COLOR_BTNTEXT));
HPEN holdPen;
INT oldBkMode;
......@@ -1834,16 +1834,14 @@ static void TAB_DrawItem(
(GetFocus() == hwnd) &&
(iItem == infoPtr->uFocus) )
{
HBRUSH hOldBrush;
r = itemRect;
InflateRect(&r, -1, -1);
hOldBrush = SelectObject(hdc, GetStockObject(NULL_BRUSH));
SelectObject(hdc, hfocusPen);
MoveToEx (hdc, r.left, r.top, NULL);
LineTo (hdc, r.right - 1, r.top);
LineTo (hdc, r.right - 1, r.bottom - 1);
LineTo (hdc, r.left, r.bottom - 1);
LineTo (hdc, r.left, r.top);
Rectangle(hdc, r.left, r.top, r.right, r.bottom);
SelectObject(hdc, hOldBrush);
}
/* Cleanup */
......
......@@ -2117,7 +2117,7 @@ TREEVIEW_DrawItemLines(TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
/*
* Get a dotted grey pen
*/
hNewPen = CreatePen(PS_DOT, 0, infoPtr->clrLine);
hNewPen = CreatePen(PS_ALTERNATE, 0, infoPtr->clrLine);
hOldPen = SelectObject(hdc, hNewPen);
MoveToEx(hdc, item->stateOffset, centery, NULL);
......@@ -2343,29 +2343,10 @@ TREEVIEW_DrawItem(TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *wineItem)
DeleteObject(hbrBk);
}
/* Draw the box arround the selected item */
/* Draw the box around the selected item */
if ((wineItem == infoPtr->selectedItem) && inFocus)
{
HPEN hNewPen = CreatePen(PS_DOT, 0,
GetSysColor(COLOR_WINDOWTEXT));
HPEN hOldPen = SelectObject(hdc, hNewPen);
INT rop = SetROP2(hdc, R2_XORPEN);
POINT points[5];
points[4].x = points[0].x = rcText.left;
points[4].y = points[0].y = rcText.top;
points[1].x = rcText.right - 1;
points[1].y = rcText.top;
points[2].x = rcText.right - 1;
points[2].y = rcText.bottom - 1;
points[3].x = rcText.left;
points[3].y = rcText.bottom - 1;
Polyline(hdc, points, 5);
SetROP2(hdc, rop);
SelectObject(hdc, hOldPen);
DeleteObject(hNewPen);
DrawFocusRect(hdc,&rcText);
}
InflateRect(&rcText, -2, -1); /* allow for the focus rect */
......
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