将位图设置为mfc中的元素 [英] setting a bitmap into an element in mfc

查看:71
本文介绍了将位图设置为mfc中的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,这又是我了......



我试图将位图设置为MFC中的元素,但这不起作用。



首先我创建了一个Dialog并添加了一个元素,比我还添加了一个变量(Category:Control)。我用变量 .SetBitmap(..) [ ^ ] ...



为什么不工作?





问候

Epanjohura

Hey guys, It''s me again...

I tried to set a bitmap into an element in MFC, but that didn''t work.

First I created a Dialog and added an element, than I also added a variable (Category: Control). I used "variable".SetBitmap(..)[^]...

Why isn''t it working?


Greetings
Epanjohura

推荐答案

在对话框的资源编辑器中,您必须将复选框的属性位图设置为true。



之后,调用SetBitmap方法将允许用位图替换复选框的文本。



或者通过代码,您必须修改复选框的样式以包含BS_BITMAP。

In the resource editor of your dialog, you have to put the property "Bitmap" of your checkbox to "true".

After that, calling the "SetBitmap" method will allow to replace the text of your checkbox with the bitmap.

Or by code, you will have to modify the style of the checkbox to include the BS_BITMAP.
variable.ModifyStyle(0,BS_BITMAP);


我真的需要你的帮助..?
I really need your help guys.. ?


这篇关于将位图设置为mfc中的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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