1

I am making a program that makes extensive use of the Aero glass features of Windows Vista/7. I render text on glass using DrawThemeTextEx and setting iGlowSize appropriately. However, having the glow effect on text makes other elements like pictures and buttons look "plain". I would like these to have the same glow effect. The issue is that the pictures are dynamic, not always the same size, etc.

One technique is the method I would use in websites, having 6 images (one for each corner and one for up/down and left/right) and stitch together a complete border. However, I wish to make the glow size customizable, so this technique won't work either.

So the two possibilities I see are:

  • Using a built-in method like DrawThemeTextEx to draw the appropriate glow. If so, then what method can I use?
  • Draw a glow-border myself using Graphics. If this is the only choice, how can I make a glow similar to the one used for text?

Some other notes: This is in C# using Forms (not WPF). I do not mind using P/Invoke.

coderforlife
  • 1,378
  • 18
  • 31
  • 3
    iGlowSize is a hack to make anti-aliasing work. Like ClearType. Which requires the background pixels to have a known color, unavailable with true glass. Avoid turning a hack into a feature. – Hans Passant Jun 25 '11 at 20:20
  • I disagree. If I set iGlowSize to 0 or don't use DTT_GLOWSIZE then the text is anti-aliased just fine on pure glass. – coderforlife Jun 25 '11 at 21:19

0 Answers0