Sign in to follow this  
LizardCPP

Disabled Windows control font

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this