DrawThemeIcon

I'm trying to use DrawThemeIcon to render a disabled bitmap on an owner draw button using XP themes. The API doc implies that I can use the state PBS_DISABLED to apply the disabled effect to the bitmap. This does not appear to work. Is this a valid assumption. If not, what is the recommended way to accomplish this


Answer this question

DrawThemeIcon

  • Animats

    Thanks for the reply. Can you elaborate on the GDI calls you used

  • mg123

     BaradaNikto wrote:
    I'm trying to use DrawThemeIcon to render a disabled bitmap on an owner draw button using XP themes.  The API doc implies that I can use the state PBS_DISABLED to apply the disabled effect to the bitmap.  This does not appear to work.  Is this a valid assumption.  If not, what is the recommended way to accomplish this

    From what I understand, PBS_DISABLED is only to draw the disabled button and text, it may not work for bitmaps. I am not fully sure of this - in the past, I've not been very happy with how DrawThemeIcon worked in some scenarios, and eventually I ended up using straight GDI calls.



  • Marco2006

    BaradaNikto wrote:
    Thanks for the reply. Can you elaborate on the GDI calls you used

    My scenario was different from yours, and I didn't need to draw a disabled bitmap.

    But for your situation, I believe you can use DrawState with DSS_DISABLED.



  • DrawThemeIcon