Disabled Windows control font

Started by
2 comments, last by LizardCPP 19 years, 7 months ago
Hey I'm making my own windows controls using ATL. Now I want to draw/display my control as disable (i.e. can't be used at the moment). Everywhere in windows you see disabled buttons as a regular button but the font is diffrent, it looks like this (it's the "Define custom colors >>" button): And I just want to know if anyone knows what this font is called and also if anyone has any alternitve methods of displaying a control as disabled. thx Lizard
Advertisement
I always thought that this was (for lack of proper terminology) a subset of the font. IIRC, many fonts have the option of being embossed or shadowed just as nearly all fonts support bold or italic formating.
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
Hi,

Like Thunder_Hawk implicitely said, it is the same font. But as far as I known (yep... wrote it in extenso) this is not a subset of the font, this is simply how the text is painted in the control. You may want to have a look to the Win32 API DrawState() (from msdn) for further information.

Once this is known, it makes it clear that you cannot change the way it will be drawn by simply doing some strange font operation. The only way you can do that is by using an OWNERDRAW button. I do not know how you can do this by using pure ATL, but it should not be that complex. You may have to derivate a class from the button class, specify the ownerdraw style in the VC++ resource editor, then overiride a DrawItem method to change the standard behavior.

As a sidenote, this kind of grayed button is well known in the Windows world. Are you sure you are trying to change the default behavior for a good reason ?

HTH,
Ok thanks

It is the DrawStae function that I need. And now that I know about it I find alot of resources on google.

thx again

Lizard

This topic is closed to new replies.

Advertisement