THX, that make it more clear that it is (again) a visual Style Problem with Xbase++ v2.xCliff Wiernik wrote:I enhanced the sample below per your requests ...
Express++ is build on Xbase++ ... if Alaska have change something with visual Style and do not tell us ...Cliff Wiernik wrote:So it appears that something is not working properly for Xbase 2.0/Express with themes enabled and the :SetcolorBG() method versus the use of presentation parameters. This has been forwarded with a prior example to Andreas at Alaska and I will also provide Alaska Support with this example.
I do not know if the interaction of Express has anything to do with this as the same Express code is used for both versions.
when build a native Checkbox ( Button ) using API and visual Style, without Ownerdraw, you can't set Background Color after Create
Code: Select all
@Gdi32:SetBkColor( hDC, AutomationTranslateColor(XBP* Color,.F.))
with XbpBrowse() you can use Ownerdraw / o:customDrawCell Callback Slot but for Windows API you need a "Trick" when hook WM_CTLCOLORBTN / WM_CTLCOLORSTATIC Windows Message.
do you remember "black" Checkbox in Xbase++ Groupbox ?
it was the mistake of XBPSYSCLR_TRANSPARENT = -255 but Windows CLR_NONE are 0 using for
Code: Select all
::BrushSysColor := @Gdi32:CreateSolidBrush(CLR_NONE)
when using a Groupbox, which is a Static under Xbase++ , it also use { XBP_PP_BGCLR, -255 } when create by Formdesign ( Parent of Group ). thats why i wanted to see how it looks like without Groupbox.
btw. if you use Xbase++ v2.x Formdesign ... what will be the Result (Presentation-Parameter) ?
... and last Idea (now) : use oDialog:DrawingArea:SetColorBG() to see if it goes through the Child XbPart.