Has the function SETDCBRUSHCOLOR been deprecated and if so how do you change the brush color?
No, it hasn't. It ought to be defined in module GDI32, but isn't. You can define your own interface, for example:
interface function SetDCBrushColor (hdc,color) BIND(C,NAME="SetDCBrushColor") !DEC$ ATTRIBUTES DEFAULT, STDCALL :: SetDCBrushColor use IFWINTY integer(ULONG) :: SetDCBrushColor integer(HANDLE), intent(IN), value :: hdc integer(ULONG), intent(IN), value :: color end function SetDCBrushColor end interface
Interesting... I use CreateSolidBrush(), which is defined in GDI32, works perfectly. Note that with this API you have to explicitly clean up with DeleteObject(hbrush) when done. The MSDN chat on SetDCBrushColor is unclear (to me, at least) about who does the memory management when a stock system brush is replaced with a user brush, so be careful not to create small memory leaks which would be difficult to detect.