mirror of
https://github.com/reactos/reactos.git
synced 2024-11-19 21:48:10 +00:00
Get rid of the SysColorPen stuff in user32, it's a wine concept. Use DC pen instead.
svn path=/trunk/; revision=41678
This commit is contained in:
parent
cbad176bd8
commit
314b21119c
7 changed files with 58 additions and 64 deletions
|
@ -860,8 +860,12 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
|
||||||
SendMessageW( parent, WM_CTLCOLORBTN, (WPARAM)hDC, (LPARAM)hwnd );
|
SendMessageW( parent, WM_CTLCOLORBTN, (WPARAM)hDC, (LPARAM)hwnd );
|
||||||
|
|
||||||
setup_clipping( hwnd, hDC );
|
setup_clipping( hwnd, hDC );
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
hOldPen = SelectObject(hDC, GetStockObject(DC_PEN));
|
||||||
|
SetDCPenColor(hDC, GetSysColor(COLOR_WINDOWFRAME));
|
||||||
|
#else
|
||||||
hOldPen = SelectObject(hDC, SYSCOLOR_GetPen(COLOR_WINDOWFRAME));
|
hOldPen = SelectObject(hDC, SYSCOLOR_GetPen(COLOR_WINDOWFRAME));
|
||||||
|
#endif
|
||||||
hOldBrush = SelectObject(hDC,GetSysColorBrush(COLOR_BTNFACE));
|
hOldBrush = SelectObject(hDC,GetSysColorBrush(COLOR_BTNFACE));
|
||||||
oldBkMode = SetBkMode(hDC, TRANSPARENT);
|
oldBkMode = SetBkMode(hDC, TRANSPARENT);
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
HPEN WINAPI GetSysColorPen (int nIndex);
|
|
||||||
void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
|
void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
|
||||||
|
|
|
@ -64,9 +64,6 @@
|
||||||
#define NtUserGetSysColorBrushes(HBrushes, count) \
|
#define NtUserGetSysColorBrushes(HBrushes, count) \
|
||||||
(BOOL)NtUserCallTwoParam((DWORD)(HBrushes), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES)
|
(BOOL)NtUserCallTwoParam((DWORD)(HBrushes), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES)
|
||||||
|
|
||||||
#define NtUserGetSysColorPens(HPens, count) \
|
|
||||||
(BOOL)NtUserCallTwoParam((DWORD)(HPens), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORPENS)
|
|
||||||
|
|
||||||
#define NtUserGetSysColors(ColorRefs, count) \
|
#define NtUserGetSysColors(ColorRefs, count) \
|
||||||
(BOOL)NtUserCallTwoParam((DWORD)(ColorRefs), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORS)
|
(BOOL)NtUserCallTwoParam((DWORD)(ColorRefs), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORS)
|
||||||
|
|
||||||
|
@ -229,7 +226,6 @@ extern PUSER_HANDLE_ENTRY gHandleEntries;
|
||||||
PUSER_HANDLE_ENTRY FASTCALL GetUser32Handle(HANDLE);
|
PUSER_HANDLE_ENTRY FASTCALL GetUser32Handle(HANDLE);
|
||||||
PVOID FASTCALL ValidateHandle(HANDLE, UINT);
|
PVOID FASTCALL ValidateHandle(HANDLE, UINT);
|
||||||
|
|
||||||
#define SYSCOLOR_GetPen(index) GetSysColorPen(index)
|
|
||||||
#define WIN_GetFullHandle(h) ((HWND)(h))
|
#define WIN_GetFullHandle(h) ((HWND)(h))
|
||||||
|
|
||||||
#ifndef __ms_va_list
|
#ifndef __ms_va_list
|
||||||
|
|
|
@ -70,21 +70,6 @@ GetSysColor(int nIndex)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
HPEN WINAPI
|
|
||||||
GetSysColorPen(int nIndex)
|
|
||||||
{
|
|
||||||
if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
|
|
||||||
{
|
|
||||||
return g_psi->SysColorPens[nIndex];
|
|
||||||
}
|
|
||||||
|
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -120,7 +120,6 @@ static const signed char LTRBInnerFlat[] = {
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
HPEN WINAPI GetSysColorPen(int nIndex);
|
|
||||||
HBRUSH WINAPI GetSysColorBrush(int nIndex);
|
HBRUSH WINAPI GetSysColorBrush(int nIndex);
|
||||||
|
|
||||||
/* Ported from WINE20020904 */
|
/* Ported from WINE20020904 */
|
||||||
|
@ -187,9 +186,9 @@ static BOOL IntDrawDiagEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(InnerI != -1)
|
if(InnerI != -1)
|
||||||
InnerPen = GetSysColorPen(InnerI);
|
InnerPen = GetStockObject(DC_PEN);
|
||||||
if(OuterI != -1)
|
if(OuterI != -1)
|
||||||
OuterPen = GetSysColorPen(OuterI);
|
OuterPen = GetStockObject(DC_PEN);
|
||||||
|
|
||||||
MoveToEx(hdc, 0, 0, &SavePoint);
|
MoveToEx(hdc, 0, 0, &SavePoint);
|
||||||
|
|
||||||
|
@ -241,9 +240,11 @@ static BOOL IntDrawDiagEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags)
|
||||||
|
|
||||||
MoveToEx(hdc, spx, spy, NULL);
|
MoveToEx(hdc, spx, spy, NULL);
|
||||||
SelectObject(hdc, OuterPen);
|
SelectObject(hdc, OuterPen);
|
||||||
|
SetDCPenColor(hdc, GetSysColor(OuterI));
|
||||||
LineTo(hdc, epx, epy);
|
LineTo(hdc, epx, epy);
|
||||||
|
|
||||||
SelectObject(hdc, InnerPen);
|
SelectObject(hdc, InnerPen);
|
||||||
|
SetDCPenColor(hdc, GetSysColor(InnerI));
|
||||||
|
|
||||||
switch(uFlags & (BF_RECT|BF_DIAGONAL))
|
switch(uFlags & (BF_RECT|BF_DIAGONAL))
|
||||||
{
|
{
|
||||||
|
@ -337,11 +338,11 @@ static BOOL IntDrawDiagEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags)
|
||||||
if((uFlags & BF_MIDDLE) && retval)
|
if((uFlags & BF_MIDDLE) && retval)
|
||||||
{
|
{
|
||||||
HBRUSH hbsave;
|
HBRUSH hbsave;
|
||||||
HBRUSH hb = GetSysColorBrush(uFlags & BF_MONO ? COLOR_WINDOW : COLOR_BTNFACE);
|
|
||||||
HPEN hpsave;
|
HPEN hpsave;
|
||||||
HPEN hp = GetSysColorPen(uFlags & BF_MONO ? COLOR_WINDOW : COLOR_BTNFACE);
|
hbsave = (HBRUSH)SelectObject(hdc, GetStockObject(DC_BRUSH));
|
||||||
hbsave = (HBRUSH)SelectObject(hdc, hb);
|
hpsave = (HPEN)SelectObject(hdc, GetStockObject(DC_PEN));
|
||||||
hpsave = (HPEN)SelectObject(hdc, hp);
|
SetDCBrushColor(hdc, GetSysColor(uFlags & BF_MONO ? COLOR_WINDOW : COLOR_BTNFACE));
|
||||||
|
SetDCPenColor(hdc, GetSysColor(uFlags & BF_MONO ? COLOR_WINDOW : COLOR_BTNFACE));
|
||||||
Polygon(hdc, Points, 4);
|
Polygon(hdc, Points, 4);
|
||||||
SelectObject(hdc, hbsave);
|
SelectObject(hdc, hbsave);
|
||||||
SelectObject(hdc, hpsave);
|
SelectObject(hdc, hpsave);
|
||||||
|
@ -503,13 +504,13 @@ static BOOL IntDrawRectEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags)
|
||||||
LTpenplus = 1;
|
LTpenplus = 1;
|
||||||
|
|
||||||
if(LTInnerI != -1)
|
if(LTInnerI != -1)
|
||||||
LTInnerPen = GetSysColorPen(LTInnerI);
|
LTInnerPen = GetStockObject(DC_PEN);
|
||||||
if(LTOuterI != -1)
|
if(LTOuterI != -1)
|
||||||
LTOuterPen = GetSysColorPen(LTOuterI);
|
LTOuterPen = GetStockObject(DC_PEN);
|
||||||
if(RBInnerI != -1)
|
if(RBInnerI != -1)
|
||||||
RBInnerPen = GetSysColorPen(RBInnerI);
|
RBInnerPen = GetStockObject(DC_PEN);
|
||||||
if(RBOuterI != -1)
|
if(RBOuterI != -1)
|
||||||
RBOuterPen = GetSysColorPen(RBOuterI);
|
RBOuterPen = GetStockObject(DC_PEN);
|
||||||
if((uFlags & BF_MIDDLE) && retval)
|
if((uFlags & BF_MIDDLE) && retval)
|
||||||
{
|
{
|
||||||
FillRect(hdc, &InnerRect, GetSysColorBrush(uFlags & BF_MONO ?
|
FillRect(hdc, &InnerRect, GetSysColorBrush(uFlags & BF_MONO ?
|
||||||
|
@ -519,6 +520,7 @@ static BOOL IntDrawRectEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags)
|
||||||
|
|
||||||
/* Draw the outer edge */
|
/* Draw the outer edge */
|
||||||
SelectObject(hdc, LTOuterPen);
|
SelectObject(hdc, LTOuterPen);
|
||||||
|
SetDCPenColor(hdc, GetSysColor(LTOuterI));
|
||||||
if(uFlags & BF_TOP)
|
if(uFlags & BF_TOP)
|
||||||
{
|
{
|
||||||
MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
|
MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
|
||||||
|
@ -530,6 +532,7 @@ static BOOL IntDrawRectEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags)
|
||||||
LineTo(hdc, InnerRect.left, InnerRect.bottom);
|
LineTo(hdc, InnerRect.left, InnerRect.bottom);
|
||||||
}
|
}
|
||||||
SelectObject(hdc, RBOuterPen);
|
SelectObject(hdc, RBOuterPen);
|
||||||
|
SetDCPenColor(hdc, GetSysColor(RBOuterI));
|
||||||
if(uFlags & BF_BOTTOM)
|
if(uFlags & BF_BOTTOM)
|
||||||
{
|
{
|
||||||
MoveToEx(hdc, InnerRect.left, InnerRect.bottom-1, NULL);
|
MoveToEx(hdc, InnerRect.left, InnerRect.bottom-1, NULL);
|
||||||
|
@ -543,6 +546,7 @@ static BOOL IntDrawRectEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags)
|
||||||
|
|
||||||
/* Draw the inner edge */
|
/* Draw the inner edge */
|
||||||
SelectObject(hdc, LTInnerPen);
|
SelectObject(hdc, LTInnerPen);
|
||||||
|
SetDCPenColor(hdc, GetSysColor(LTInnerI));
|
||||||
if(uFlags & BF_TOP)
|
if(uFlags & BF_TOP)
|
||||||
{
|
{
|
||||||
MoveToEx(hdc, InnerRect.left+LTpenplus, InnerRect.top+1, NULL);
|
MoveToEx(hdc, InnerRect.left+LTpenplus, InnerRect.top+1, NULL);
|
||||||
|
@ -554,6 +558,7 @@ static BOOL IntDrawRectEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags)
|
||||||
LineTo(hdc, InnerRect.left+1, InnerRect.bottom-LBpenplus);
|
LineTo(hdc, InnerRect.left+1, InnerRect.bottom-LBpenplus);
|
||||||
}
|
}
|
||||||
SelectObject(hdc, RBInnerPen);
|
SelectObject(hdc, RBInnerPen);
|
||||||
|
SetDCPenColor(hdc, GetSysColor(RBInnerI));
|
||||||
if(uFlags & BF_BOTTOM)
|
if(uFlags & BF_BOTTOM)
|
||||||
{
|
{
|
||||||
MoveToEx(hdc, InnerRect.left+LBpenplus, InnerRect.bottom-2, NULL);
|
MoveToEx(hdc, InnerRect.left+LBpenplus, InnerRect.bottom-2, NULL);
|
||||||
|
@ -891,8 +896,9 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
|
||||||
POINT Line[4];
|
POINT Line[4];
|
||||||
int SmallDiam = UITOOLS_MakeSquareRect(r, &myr) - 2;
|
int SmallDiam = UITOOLS_MakeSquareRect(r, &myr) - 2;
|
||||||
int i;
|
int i;
|
||||||
HBRUSH hbsave, hb, hb2;
|
HBRUSH hbsave;
|
||||||
HPEN hpsave, hp, hp2;
|
HPEN hpsave;
|
||||||
|
COLORREF crPen1, crPen2, crBrush1, crBrush2;
|
||||||
int d46, d93;
|
int d46, d93;
|
||||||
// end scrollgripsize
|
// end scrollgripsize
|
||||||
switch(uFlags & 0xff)
|
switch(uFlags & 0xff)
|
||||||
|
@ -909,7 +915,7 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
|
||||||
case DFCS_SCROLLLEFT:
|
case DFCS_SCROLLLEFT:
|
||||||
Symbol = '3';
|
Symbol = '3';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DFCS_SCROLLRIGHT:
|
case DFCS_SCROLLRIGHT:
|
||||||
Symbol = '4';
|
Symbol = '4';
|
||||||
break;
|
break;
|
||||||
|
@ -918,20 +924,21 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
|
||||||
// FIXME: needs to use marlett too, copied for compatibility only
|
// FIXME: needs to use marlett too, copied for compatibility only
|
||||||
/* This one breaks the flow... */
|
/* This one breaks the flow... */
|
||||||
IntDrawRectEdge(dc, r, EDGE_BUMP, BF_MIDDLE | ((uFlags&(DFCS_MONO|DFCS_FLAT)) ? BF_MONO : 0));
|
IntDrawRectEdge(dc, r, EDGE_BUMP, BF_MIDDLE | ((uFlags&(DFCS_MONO|DFCS_FLAT)) ? BF_MONO : 0));
|
||||||
hpsave = (HPEN)SelectObject(dc, GetStockObject(NULL_PEN));
|
hpsave = (HPEN)SelectObject(dc, GetStockObject(DC_PEN));
|
||||||
hbsave = (HBRUSH)SelectObject(dc, GetStockObject(NULL_BRUSH));
|
hbsave = (HBRUSH)SelectObject(dc, GetStockObject(DC_BRUSH));
|
||||||
if(uFlags & (DFCS_MONO|DFCS_FLAT))
|
if(uFlags & (DFCS_MONO|DFCS_FLAT))
|
||||||
{
|
{
|
||||||
hp = hp2 = GetSysColorPen(COLOR_WINDOWFRAME);
|
crPen1 = crPen2 = GetSysColor(COLOR_WINDOWFRAME);
|
||||||
hb = hb2 = GetSysColorBrush(COLOR_WINDOWFRAME);
|
crBrush1 = crBrush2 = GetSysColor(COLOR_WINDOWFRAME);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hp = GetSysColorPen(COLOR_BTNHIGHLIGHT);
|
crPen1 = GetSysColor(COLOR_BTNHIGHLIGHT);
|
||||||
hp2 = GetSysColorPen(COLOR_BTNSHADOW);
|
crPen2 = GetSysColor(COLOR_BTNSHADOW);
|
||||||
hb = GetSysColorBrush(COLOR_BTNHIGHLIGHT);
|
crBrush1 = GetSysColor(COLOR_BTNHIGHLIGHT);
|
||||||
hb2 = GetSysColorBrush(COLOR_BTNSHADOW);
|
crBrush2 = GetSysColor(COLOR_BTNSHADOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
Line[0].x = Line[1].x = r->right-1;
|
Line[0].x = Line[1].x = r->right-1;
|
||||||
Line[2].y = Line[3].y = r->bottom-1;
|
Line[2].y = Line[3].y = r->bottom-1;
|
||||||
d46 = 46*SmallDiam/750;
|
d46 = 46*SmallDiam/750;
|
||||||
|
@ -942,15 +949,15 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
|
||||||
Line[3].x = r->right - i - 1;
|
Line[3].x = r->right - i - 1;
|
||||||
Line[1].y = Line[0].y + d46;
|
Line[1].y = Line[0].y + d46;
|
||||||
Line[2].x = Line[3].x + d46;
|
Line[2].x = Line[3].x + d46;
|
||||||
SelectObject(dc, hb);
|
SetDCBrushColor(dc, crBrush1);
|
||||||
SelectObject(dc, hp);
|
SetDCPenColor(dc, crPen1);
|
||||||
Polygon(dc, Line, 4);
|
Polygon(dc, Line, 4);
|
||||||
|
|
||||||
Line[1].y++; Line[2].x++;
|
Line[1].y++; Line[2].x++;
|
||||||
Line[0].y = Line[1].y + d93;
|
Line[0].y = Line[1].y + d93;
|
||||||
Line[3].x = Line[2].x + d93;
|
Line[3].x = Line[2].x + d93;
|
||||||
SelectObject(dc, hb2);
|
SetDCBrushColor(dc, crBrush2);
|
||||||
SelectObject(dc, hp2);
|
SetDCPenColor(dc, crPen2);
|
||||||
Polygon(dc, Line, 4);
|
Polygon(dc, Line, 4);
|
||||||
|
|
||||||
i = 398*SmallDiam/750;
|
i = 398*SmallDiam/750;
|
||||||
|
@ -958,15 +965,15 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
|
||||||
Line[3].x = r->right - i - 1;
|
Line[3].x = r->right - i - 1;
|
||||||
Line[1].y = Line[0].y + d46;
|
Line[1].y = Line[0].y + d46;
|
||||||
Line[2].x = Line[3].x + d46;
|
Line[2].x = Line[3].x + d46;
|
||||||
SelectObject(dc, hb);
|
SetDCBrushColor(dc, crBrush1);
|
||||||
SelectObject(dc, hp);
|
SetDCPenColor(dc, crPen1);
|
||||||
Polygon(dc, Line, 4);
|
Polygon(dc, Line, 4);
|
||||||
|
|
||||||
Line[1].y++; Line[2].x++;
|
Line[1].y++; Line[2].x++;
|
||||||
Line[0].y = Line[1].y + d93;
|
Line[0].y = Line[1].y + d93;
|
||||||
Line[3].x = Line[2].x + d93;
|
Line[3].x = Line[2].x + d93;
|
||||||
SelectObject(dc, hb2);
|
SetDCBrushColor(dc, crBrush2);
|
||||||
SelectObject(dc, hp2);
|
SetDCPenColor(dc, crPen2);
|
||||||
Polygon(dc, Line, 4);
|
Polygon(dc, Line, 4);
|
||||||
|
|
||||||
i = 210*SmallDiam/750;
|
i = 210*SmallDiam/750;
|
||||||
|
@ -974,15 +981,15 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
|
||||||
Line[3].x = r->right - i - 1;
|
Line[3].x = r->right - i - 1;
|
||||||
Line[1].y = Line[0].y + d46;
|
Line[1].y = Line[0].y + d46;
|
||||||
Line[2].x = Line[3].x + d46;
|
Line[2].x = Line[3].x + d46;
|
||||||
SelectObject(dc, hb);
|
SetDCBrushColor(dc, crBrush1);
|
||||||
SelectObject(dc, hp);
|
SetDCPenColor(dc, crPen1);
|
||||||
Polygon(dc, Line, 4);
|
Polygon(dc, Line, 4);
|
||||||
|
|
||||||
Line[1].y++; Line[2].x++;
|
Line[1].y++; Line[2].x++;
|
||||||
Line[0].y = Line[1].y + d93;
|
Line[0].y = Line[1].y + d93;
|
||||||
Line[3].x = Line[2].x + d93;
|
Line[3].x = Line[2].x + d93;
|
||||||
SelectObject(dc, hb2);
|
SetDCBrushColor(dc, crBrush2);
|
||||||
SelectObject(dc, hp2);
|
SetDCPenColor(dc, crPen2);
|
||||||
Polygon(dc, Line, 4);
|
Polygon(dc, Line, 4);
|
||||||
|
|
||||||
SelectObject(dc, hpsave);
|
SelectObject(dc, hpsave);
|
||||||
|
|
|
@ -659,7 +659,8 @@ MenuDrawMenuItem(HWND hWnd, PROSMENUINFO MenuInfo, HWND WndOwner, HDC Dc,
|
||||||
rc.bottom = Height - 3;
|
rc.bottom = Height - 3;
|
||||||
if (flat_menu)
|
if (flat_menu)
|
||||||
{
|
{
|
||||||
oldPen = SelectObject( Dc, GetSysColorPen(COLOR_BTNSHADOW) );
|
oldPen = SelectObject( Dc, GetStockObject(DC_PEN) );
|
||||||
|
SetDCPenColor(Dc, GetSysColor(COLOR_BTNSHADOW));
|
||||||
MoveToEx( Dc, rc.left, rc.top, NULL );
|
MoveToEx( Dc, rc.left, rc.top, NULL );
|
||||||
LineTo( Dc, rc.left, rc.bottom );
|
LineTo( Dc, rc.left, rc.bottom );
|
||||||
SelectObject( Dc, oldPen );
|
SelectObject( Dc, oldPen );
|
||||||
|
@ -678,7 +679,8 @@ MenuDrawMenuItem(HWND hWnd, PROSMENUINFO MenuInfo, HWND WndOwner, HDC Dc,
|
||||||
rc.top += SEPARATOR_HEIGHT / 2;
|
rc.top += SEPARATOR_HEIGHT / 2;
|
||||||
if (flat_menu)
|
if (flat_menu)
|
||||||
{
|
{
|
||||||
oldPen = SelectObject( Dc, GetSysColorPen(COLOR_BTNSHADOW) );
|
oldPen = SelectObject( Dc, GetStockObject(DC_PEN) );
|
||||||
|
SetDCPenColor(Dc, GetSysColor(COLOR_BTNSHADOW));
|
||||||
MoveToEx( Dc, rc.left, rc.top, NULL );
|
MoveToEx( Dc, rc.left, rc.top, NULL );
|
||||||
LineTo( Dc, rc.right, rc.top );
|
LineTo( Dc, rc.right, rc.top );
|
||||||
SelectObject( Dc, oldPen );
|
SelectObject( Dc, oldPen );
|
||||||
|
@ -692,7 +694,8 @@ MenuDrawMenuItem(HWND hWnd, PROSMENUINFO MenuInfo, HWND WndOwner, HDC Dc,
|
||||||
/* helper lines for debugging */
|
/* helper lines for debugging */
|
||||||
/* This is a very good test tool when hacking menus! (JT) 07/16/2006 */
|
/* This is a very good test tool when hacking menus! (JT) 07/16/2006 */
|
||||||
FrameRect(Dc, &Rect, GetStockObject(BLACK_BRUSH));
|
FrameRect(Dc, &Rect, GetStockObject(BLACK_BRUSH));
|
||||||
SelectObject(Dc, GetSysColorPen(COLOR_WINDOWFRAME));
|
SelectObject(Dc, GetStockObject(DC_PEN));
|
||||||
|
SetDCPenColor(Dc, GetSysColor(COLOR_WINDOWFRAME));
|
||||||
MoveToEx(Dc, Rect.left, (Rect.top + Rect.bottom) / 2, NULL);
|
MoveToEx(Dc, Rect.left, (Rect.top + Rect.bottom) / 2, NULL);
|
||||||
LineTo(Dc, Rect.right, (Rect.top + Rect.bottom) / 2);
|
LineTo(Dc, Rect.right, (Rect.top + Rect.bottom) / 2);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1639,7 +1642,8 @@ DrawMenuBarTemp(HWND Wnd, HDC DC, LPRECT Rect, HMENU Menu, HFONT Font)
|
||||||
|
|
||||||
FillRect(DC, Rect, GetSysColorBrush(flat_menu ? COLOR_MENUBAR : COLOR_MENU));
|
FillRect(DC, Rect, GetSysColorBrush(flat_menu ? COLOR_MENUBAR : COLOR_MENU));
|
||||||
|
|
||||||
SelectObject(DC, GetSysColorPen(COLOR_3DFACE));
|
SelectObject(DC, GetStockObject(DC_PEN));
|
||||||
|
SetDCPenColor(DC, GetSysColor(COLOR_3DFACE));
|
||||||
MoveToEx(DC, Rect->left, Rect->bottom, NULL);
|
MoveToEx(DC, Rect->left, Rect->bottom, NULL);
|
||||||
LineTo(DC, Rect->right, Rect->bottom);
|
LineTo(DC, Rect->right, Rect->bottom);
|
||||||
|
|
||||||
|
@ -4010,7 +4014,7 @@ DrawMenuBar(HWND hWnd)
|
||||||
MenuInfo.Height = 0; // make sure to recalc size
|
MenuInfo.Height = 0; // make sure to recalc size
|
||||||
MenuSetRosMenuInfo(&MenuInfo);
|
MenuSetRosMenuInfo(&MenuInfo);
|
||||||
/* The wine method doesn't work and I suspect it's more effort
|
/* The wine method doesn't work and I suspect it's more effort
|
||||||
then hackfix solution
|
then hackfix solution
|
||||||
SetWindowPos( hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
|
SetWindowPos( hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
|
||||||
SWP_NOZORDER | SWP_FRAMECHANGED );
|
SWP_NOZORDER | SWP_FRAMECHANGED );
|
||||||
return TRUE;*/
|
return TRUE;*/
|
||||||
|
@ -4224,7 +4228,7 @@ GetMenuItemInfoA(
|
||||||
|
|
||||||
RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
||||||
mii->dwTypeData = AnsiBuffer;
|
mii->dwTypeData = AnsiBuffer;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,6 @@ VOID
|
||||||
IntDrawScrollBar(HWND hWnd, HDC hDC, INT nBar);
|
IntDrawScrollBar(HWND hWnd, HDC hDC, INT nBar);
|
||||||
DWORD
|
DWORD
|
||||||
IntScrollHitTest(HWND hWnd, INT nBar, POINT pt, BOOL bDragging);
|
IntScrollHitTest(HWND hWnd, INT nBar, POINT pt, BOOL bDragging);
|
||||||
HPEN WINAPI
|
|
||||||
GetSysColorPen(int nIndex);
|
|
||||||
|
|
||||||
BOOL WINAPI GdiGradientFill(HDC,PTRIVERTEX,ULONG,PVOID,ULONG,ULONG);
|
BOOL WINAPI GdiGradientFill(HDC,PTRIVERTEX,ULONG,PVOID,ULONG,ULONG);
|
||||||
|
|
||||||
|
@ -432,7 +430,8 @@ DefWndNCPaint(HWND hWnd, HRGN hRgn, BOOL Active)
|
||||||
if(!(Style & WS_MINIMIZE))
|
if(!(Style & WS_MINIMIZE))
|
||||||
{
|
{
|
||||||
/* Line under caption */
|
/* Line under caption */
|
||||||
PreviousPen = SelectObject(hDC, GetSysColorPen(
|
PreviousPen = SelectObject(hDC, GetStockObject(DC_PEN));
|
||||||
|
SetDCPenColor(hDC, GetSysColor(
|
||||||
((ExStyle & (WS_EX_STATICEDGE | WS_EX_CLIENTEDGE |
|
((ExStyle & (WS_EX_STATICEDGE | WS_EX_CLIENTEDGE |
|
||||||
WS_EX_DLGMODALFRAME)) == WS_EX_STATICEDGE) ?
|
WS_EX_DLGMODALFRAME)) == WS_EX_STATICEDGE) ?
|
||||||
COLOR_WINDOWFRAME : COLOR_3DFACE));
|
COLOR_WINDOWFRAME : COLOR_3DFACE));
|
||||||
|
|
Loading…
Reference in a new issue