[DUG] Windows System Colour
Rohit Gupta
r.gupta at xtra.co.nz
Wed Apr 1 09:04:38 NZST 2009
I realise that Edward, but I havent explained what I am doing properly.
Its existing code that I am adding to.
It loads a bitmap into tbitmap then draws the bitmap on a canvas.
Before doing that it takes the color of the canvas whcich happens to be
clBtnface and puts it into the bitmaps transparent colour (using the
corner pixel as the reference).
The existing two bitmaps work fine. The one I have shows up with a
moneygreen background on it.
It doesnt matter in which order I draw them or in what combination, the
existing ones are all ok. All three bitmaps are identical in
construction. Its just weird.
Edward Huang wrote:
> Hi,
>
> As far as I know, these system colours can be different depends on
> Windows themes, and "anyone" can change them in Windows. So
> clBtnFace in one machine has no guarantee to be the same to another
> machine. There's API to find out real colour for each system colour,
> although I can't remember on top of my head.
>
> Cheers,
>
> Edward
>
> -----Original Message-----
> *From:* delphi-bounces at delphi.org.nz
> [mailto:delphi-bounces at delphi.org.nz]*On Behalf Of *Robert martin
> *Sent:* Friday, 20 March 2009 16:45
> *To:* rohit at cfl.co.nz; NZ Borland Developers Group - Delphi List
> *Subject:* Re: [DUG] Windows System Colour
>
> Hi Rohit
>
> I suspect the issue is how you are replacing the pixel. I'm no
> expert in this but some of the painting / drawing routines do XORs
> etc of the new and old colour depending on the API and parmters
> set. I would check there first.
>
> Hope that is some help.
>
> Cheers
> Rob
>
> /Robert Martin/
>
> /Software development manager/
>
> Chreos
>
> www.chreos.co.nz
>
> Ph +64 03 377-0495
>
>
>
> Rohit Gupta wrote:
>> I am a little puzzled. I know that the system colours such as
>> clBtnFace are special constants. In one part of the app, when I
>> replace a pixel in a bitmap to clBtnFace it goes gray like it
>> should. In another part of the app it goes money-greeny. Both
>> do it consustently.
>>
>> Any clues ? Do I need to convert these special colours to real
>> colours ? I couldn't find any function to do it.
>>
>>
>>
>> --
>> Regards
>>
>> *Rohit Gupta*
>> B.E. Elec., M.E., Mem IEEE, Member IET
>> Technical Manager
>> Computer Fanatics Ltd
>>
>> *Tel *4892280
>> *Fax *4892290
>> *Web *www.cfl.co.nz
>> ------------------------------------------------------------------------
>> This email and any attachments contain information, which is
>> confidential and may be subject to legal privilege and copyright.
>> If you are not the intended recipient, you must not use,
>> distribute or copy this email or attachments. If you have
>> received this in error, please notify us immediately by return
>> email and then delete this email and any attachments.
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at delphi.org.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>
>
More information about the Delphi
mailing list