如何在mfc按钮上设置按钮单击效果 [英] How to set the button click effect on mfc buttons

查看:299
本文介绍了如何在mfc按钮上设置按钮单击效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我的查询就像我在mfc程序中有一个按钮我还在其上放了一个Bitmap。现在需要的是每当一个按钮被点击它应该显示按钮cliked的印象,以便它应该显示颜色或透明度的某种变化,以便用户可以知道他/她已经点击了按钮。我怎么能这样做?



我试图在按钮上加载一个不同的Bitmap,然后重新加载以前的位图,但它没有帮助。





谢谢,

Pradeep Sharma

解决方案

你可以使用CMFCButton :: SetImage来放置三个图像
表示正常,选择和禁用状态。



http://msdn.microsoft.com/de-de/library/bb984522.aspx [ ^ ]

Hi all ,

My query is like I have a button in a mfc program I have also put an Bitmap on it .Now what is need is whenever a button is clicked it should show the impression of button cliked so that it should show some sort of change in colors or transparency so that user can know that he/she has clicked the button .How can I do that ?

I tried to load a different Bitmap on button cliked and then reload the previous bitmap but it did not help .


Thanks ,
Pradeep Sharma

解决方案

You can use CMFCButton::SetImage to put up to three Images
on a Button for normal, selected and disabled state.

http://msdn.microsoft.com/de-de/library/bb984522.aspx[^]


这篇关于如何在mfc按钮上设置按钮单击效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆