这个函数是用于设置工具栏按钮大小,和显示图片大小的
如:m_ToolBar.SetSizes(CSize(60,56),CSize(24,24));没什么问题,
可我把大小改了一下,就出错了,Debug Asseration failed!这是怎么回啊,
改成这个就出错了
m_ToolBar.SetSizes(CSize(60,56),CSize(60,56));
而且是时候工具栏的大小也不是设置的那样。
如:m_ToolBar.SetSizes(CSize(60,56),CSize(24,24));没什么问题,
可我把大小改了一下,就出错了,Debug Asseration failed!这是怎么回啊,
改成这个就出错了
m_ToolBar.SetSizes(CSize(60,56),CSize(60,56));
而且是时候工具栏的大小也不是设置的那样。
解决方案 »
- 创建兼容位图后位图深度问题
- 急!求助!一个关于MFC中列表框的问题
- 请教一个基础问题
- 好像很简单的问题 如何得到CDC对象的大小?
- 请问:如何让 edit box 里的字串总显示总显示最新一屏
- 给clistbox增加字串问题
- 请教一个将api的类移植到mfc程序中的问题,谢谢
- 怎么把窗口置顶?-------在线等待!
- 大家知道dll是有Export的。但是我用exeScope分析时发现,有的exe也有export,例如IpSniper的Export里赫然有一个OicqDebug.Exe,但是有的Exe又没有export。请问这是怎么回事?
- MFC中 List Box 选中项取消的问题
- 关于SetTimer的问题
- 关于登陆界面的问题
Call this member function to set the toolbar's buttons to the size, in pixels, specified in sizeButton.
void SetSizes(
SIZE sizeButton,
SIZE sizeImage
);
The sizeImage parameter must contain the size, in pixels, of the images in the toolbar's bitmap. The dimensions in sizeButton must be sufficient to hold the image plus 7 pixels extra in width and 6 pixels extra in height. This function also sets the toolbar height to fit the buttons.
m_Toolbar.SetButtonText(1,"abcd");
前面size的x要比后面的大7个像素,y要大6个像素
for(int i=0;i<7;i++)
{
Array[i]=9000+i;
} m_Toolbar.Create(this);
m_Toolbar.SetButtons(Array,7);