简体   繁体   English

消除CButton的视觉点击效果

[英]Remove visual click effect of CButton

Is there any way of removing the visual effect of clicking a CButton? 有什么方法可以消除单击CButton的视觉效果吗?

I want to put two CButtons with BMPs side by side so that they form a bigger image, but I want to remove the visual effect of the click - that is the image being pressed. 我想并排放置两个带有BMP的CButton,以便它们形成更大的图像,但是我想消除单击的视觉效果-即被按下的图像。 How can I do that? 我怎样才能做到这一点?

Use the same image for the Up and Down states of the button. 将相同的图像用于按钮的“向上”和“向下”状态。 That way it would look the same whether pressed or not. 这样无论是否按下它看起来都一样。 You will have to use the CBitmapButton class, however, which derives from CButton . 但是,您将必须使用CBitmapButton类,该类是从CButton派生的。 http://msdn.microsoft.com/en-us/library/a3y45xs0.aspx http://msdn.microsoft.com/en-us/library/a3y45xs0.aspx

There are 4 states of the button: UP, DOWN, FOCUS, DISABLED and each can have its own image (or not). 该按钮有4种状态:“上”,“下”,“聚焦”,“已禁用”,每种状态都可以具有自己的图像(或没有图像)。 http://msdn.microsoft.com/en-us/library/6y6acs49.aspx http://msdn.microsoft.com/en-us/library/6y6acs49.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM