To create a bitmap-button control in a window’s client area, follow these steps: 1.Create one to four bitmap images for the button.
2.Construct the CBitmapButton object.
3.Call the Create function to create the Windows button control and attach it to the CBitmapButton object.
4.Call the LoadBitmaps member function to load the bitmap resources after the bitmap button is constructed. 你可以自己看一下CBitmapButton的说明.
2.Construct the CBitmapButton object.
3.Call the Create function to create the Windows button control and attach it to the CBitmapButton object.
4.Call the LoadBitmaps member function to load the bitmap resources after the bitmap button is constructed. 你可以自己看一下CBitmapButton的说明.
解决方案 »
- 请高手来看看这个文件是用什么编辑的,我用Visual Studio 2010找不到资源文件
- 让视频头实时显示在picturecontrol并能拍照
- 高手请进
- 急!求图形边缘检测算法!
- unicode高手:请问如何用不同PC系统的语言显示星期
- CString的转换~~~15分钟给分
- 快来帮忙!快要晕倒了,打印问题!!
- 如何将下面c程序的代码转换成Visual C++里面的代码????
- 请高手解答:在任务管理器中, 怎样在Applications中隐藏一个用户程序 ,仅在Processes中显示进程.
- SetWindowsHookEx函数一直返回NULL,新手 请帮忙解决
- 为何用不了AnimateWindow函数
- 读文档的问题
然后将按钮设置成owner draw,bitmap属性
并且给按钮添加变量,如:m_shi
再在初始化中加入一下代码: m_shi.LoadBitmaps(IDB_BITMAP1);
即可!
我做过这个问题!
比如:现有一位图IDB_BITMAP1,
将按钮设为owner draw,bitmap属性
并且给按钮一个变量,如m_shi
最后在初始化里加入 m_shi.LoadBitmaps(IDB_BITMAP1);
即可!
m_wndButtonZoomOut.Create("大", dwStyle , m_rectButtonZoomOut, this, ID_BUTTON_ZOOMOUT);m_wndButtonZoomOut.LoadBitmaps(IDB_VIDEO_ZOOMOUT,IDB_VIDEO_ZOOMOUT1,IDB_VIDEO_ZOOMOUT2,IDB_VIDEO_ZOOMOUT3);
其中IDB_VIDEO_ZOOMOUT的4个图像分别为4个状态的图案