Jump to content
  • Advertisement
Sign in to follow this  
LizardCPP

Disabled Windows control font

This topic is 5216 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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,

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!