cmfctoolbar和用户位图 [英] cmfctoolbar and user bitmap

查看:116
本文介绍了cmfctoolbar和用户位图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用图像集合和按钮,而仅在工具栏中使用它.

I would like to use an image collection, and button and only this in my toolbar.

我正在尝试从我的CMFCToolBar使用SetUserImages和InsertButton,但是...什么也没显示

I'm trying to use SetUserImages and InsertButton from my CMFCToolBar, but ... nothing is displayed

我想我做错了什么,没有调用loadbitmap或loadtoolbar,但是OnPaint测试了pImage的有效性,这通常是错误的.

I'm thinking I've made something wrong, no call to loadbitmap nor loadtoolbar, but OnPaint test pImage validity which is avery times wrong.

有人可以帮我吗?

谢谢

Yan

推荐答案

>> 无法调用loadbitmap或loadtoolbar,

根据您的描述.   首先,应让应用程序显示位图或图像或图标.

According to your description.  First you should let application display bitmap or image or icon.

第二,您可以使用CImageList显示图像.这里有一个 演示,作者为真彩色图像创建了一个类. 此示例说明如何用真彩色工具栏替换CMainFrame中的默认工具栏.

Second you can use the CImageList to display images. Here has a demo, the author has created a class for true color image. This example shows you how to replace the default toolbar from CMainFrame with a true color toolbar.

希望它会对您有所帮助.

最好的问候

哈特


这篇关于cmfctoolbar和用户位图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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