将bitmapt加载到CToolBar吗? [英] Load bitmapt to CToolBar ?

查看:95
本文介绍了将bitmapt加载到CToolBar吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将位图加载到CToolBar.

我编写了以下代码:

I am trying to load bitmapt to CToolBar.

I have written following code:

toolbar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM);
        toolbar.LoadToolBar(IDR_TOOLBAR2);
        toolbar.LoadBitmap(IDB_BITMAP3);
        unsigned int btnarray[2];
        btnarray[0] = ID_BUTTON40024;
        toolbar.SetButtons(btnarray, 1);




我可以看到位图大小有一个黑点,但没有实际的位图.

可能是什么原因? (我正在使用VS 2008)


提前谢谢.
Prasad.




I can see there is black spot of bitmap size but not an actual bitmap.

What can be the reason ? (I am using VS 2008)


Thanks in advance.
Prasad.

推荐答案

两件事情:是否检查了函数的返回值,是否应该同时调用LoadToolBar和LoadBitmap?
Two things: Have you checked the return value of the functions, and should you really call both LoadToolBar and LoadBitmap?


这篇关于将bitmapt加载到CToolBar吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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