diff --git a/dlls/gdi/gdi32.spec b/dlls/gdi/gdi32.spec index 3957402b200..fabd8dbb918 100644 --- a/dlls/gdi/gdi32.spec +++ b/dlls/gdi/gdi32.spec @@ -198,7 +198,9 @@ @ stdcall GetColorSpace(long) @ stdcall GetCurrentObject(long long) @ stdcall GetCurrentPositionEx(long ptr) +@ stdcall GetDCBrushColor(long) @ stdcall GetDCOrgEx(long ptr) +@ stdcall GetDCPenColor(long) @ stdcall GetDIBColorTable(long long long ptr) @ stdcall GetDIBits(long long long long ptr ptr long) @ stdcall GetDeviceCaps(long long) @@ -412,8 +414,6 @@ @ extern pfnRealizePalette @ extern pfnSelectPalette @ stub pstackConnect -@ stub GetDCBrushColor #stdcall (long) -@ stub GetDCPenColor #stdcall (long) ################################################################ # Wine extensions: Win16 functions that are needed by other dlls diff --git a/objects/dc.c b/objects/dc.c index c9335fe6602..eb6d522b411 100644 --- a/objects/dc.c +++ b/objects/dc.c @@ -1458,6 +1458,29 @@ DWORD WINAPI SetLayout(HDC hdc, DWORD layout) return 0; } +/*********************************************************************** + * GetDCBrushColor (GDI32.@) + * + * Retrieves the current brush color for the specified device + * context (DC). + * + */ +COLORREF WINAPI GetDCBrushColor(HDC hdc) +{ + DC *dc; + COLORREF dcBrushColor = CLR_INVALID; + + TRACE("hdc(%p)\n", hdc); + + dc = DC_GetDCPtr( hdc ); + if (dc) + { + dcBrushColor = dc->dcBrushColor; + } + + return dcBrushColor; +} + /*********************************************************************** * SetDCBrushColor (GDI32.@) * @@ -1498,6 +1521,29 @@ COLORREF WINAPI SetDCBrushColor(HDC hdc, COLORREF crColor) return oldClr; } +/*********************************************************************** + * GetDCPenColor (GDI32.@) + * + * Retrieves the current pen color for the specified device + * context (DC). + * + */ +COLORREF WINAPI GetDCPenColor(HDC hdc) +{ + DC *dc; + COLORREF dcPenColor = CLR_INVALID; + + TRACE("hdc(%p)\n", hdc); + + dc = DC_GetDCPtr( hdc ); + if (dc) + { + dcPenColor = dc->dcPenColor; + } + + return dcPenColor; +} + /*********************************************************************** * SetDCPenColor (GDI32.@) *