Bitmap Button Coloring Question - Programmer

This is a discussion on Bitmap Button Coloring Question - Programmer ; Greetings: I have just painstakingly drawn a set of four bitmap's for use in a CBitmapButton ownerdrawn button. It all work's very well but I couldn't help but notice that when I ran my application on a colleague's system, who ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Bitmap Button Coloring Question

  1. Bitmap Button Coloring Question

    Greetings:

    I have just painstakingly drawn a set of four bitmap's for use in a
    CBitmapButton ownerdrawn button. It all work's very well but I couldn't help
    but notice that when I ran my application on a colleague's system, who uses
    a different color scheme than I, that my bitmap buttons did not fit in very
    well.

    Perhaps I am mistaken but I am pretty sure that I have seen applications
    with bitmap button controls that have fixed foreground but backgrounds that
    adjust themselves to whatever the system color for button background is
    suppost to be. Have I got this wrong? If not, I would like to know how they
    managed this.

    Thanks in advance for you help.

    Mark Roberts
    Toronto, Canada



  2. Re: Bitmap Button Coloring Question

    >Perhaps I am mistaken but I am pretty sure that I have seen applications
    >with bitmap button controls that have fixed foreground but backgrounds that
    >adjust themselves to whatever the system color for button background is
    >suppost to be.


    Mark,

    Do you really have coloured backgrounds, or do you just want
    transparency so that the normal button colour is the background? If
    it's the latter that you want, an icon style button (BS_ICON) rather
    than CBitmapButton is much easier to use. The icon style button
    supports transparency, and automatically greys if the button is
    disabled.

    Dave
    --
    MVP VC++ FAQ: http://www.mvps.org/vcfaq

  3. Re: Bitmap Button Coloring Question

    Hi,

    What do you mean they 'didn't fit in well' ? If they are owner-draw they
    will look exactly like you made them. You will run in to that problem with
    custom drawn controls. You can always use neutral colors, like greyish-blue,
    greyish-green, etc., they fit in well with most things. Or better yet, draw
    the buttons at run-time using the system colors for the face and hilight,
    etc. use GetSysColor() to get those colors.

    I just made a tree control and had to use GetSysColor() to get the BTN_FACE
    color so my custom drawn border didn't look out of place. It's a fact of
    Windows life that you pretty much have to stick with Windows styles unless
    you are going to make a full-blown custom interface. I know it sucks but
    that's the way it goes. At least XP looks pretty cool compared to older
    Windows.

    Take care,
    Robert A.



+ Reply to Thread