Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

ppTBXStatusBars - GetTextColor

edited February 2009 in General
Hi,
I compiled source code with Range Checking. When I run designer I get Range
Check Error.
I found that problem is in ppTBXStatusBars unit:

procedure TppTBXCustomStatusBar.Paint;
const
CEnabledState: array [Boolean] of Integer = (ISF_DISABLED, 0);
begin
....
Canvas.Font.Color := GetTextColor(CEnabledState[Panel.Enabled]);
....
end;

GetTextColor returns $FFFFFFFF. This function needs handle to DC, but
ISF_DISABLED is 1,
I think that it isn't valid handle :-).

Turbo Delphi 2006
RB 11.02 downloaded 3.2.2008
Windows Vista Business SP1

Thanks
Roman Krupicka

Comments

  • edited February 2009

    Thanks for the feeback. I reviewed the code. There are two occurences of
    that line of code in the TppTBXCustomStatusBar.Paint method. I think it is
    safe to comment them both out. For the next maintenance release we will
    remove those lines.

    The call to DrawTBXCaption will determine the font color - the Font color is
    part of the theme.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.