如何在mfc按钮上设置按钮单击效果

编程入门 行业动态 更新时间:2024-10-26 14:36:56
本文介绍了如何在mfc按钮上设置按钮单击效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我的查询就像我在mfc程序中有一个按钮我还在其上放了一个Bitmap。现在需要的是每当一个按钮被点击它应该显示按钮cliked的印象,以便它应该显示颜色或透明度的某种变化,以便用户可以知道他/她已经点击了按钮。我怎么能这样做? 我试图在按钮上加载一个不同的Bitmap,然后重新加载以前的位图,但它没有帮助。 谢谢, Pradeep Sharma

解决方案

你可以使用CMFCButton :: SetImage来放置三个图像 表示正常,选择和禁用状态。 msdn.microsoft/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. msdn.microsoft/de-de/library/bb984522.aspx[^]

更多推荐

如何在mfc按钮上设置按钮单击效果

本文发布于:2023-11-12 05:01:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580580.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   单击   效果   如何在   mfc

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!