在工具栏添加了10个按钮,create后。setbuttontext设置了文本,可是运行只出来前7个按钮,后面几个怎么不见了呢??
if (!m_wndMyToolBar1.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndMyToolBar1.LoadToolBar(IDR_TOOLBAR_STRUC1))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
} m_wndMyToolBar1.SetButtonText(0,_T("File"));
m_wndMyToolBar1.SetButtonText(1,_T("Edit"));
m_wndMyToolBar1.SetButtonText(2,_T("Display"));
m_wndMyToolBar1.SetButtonText(3,_T("Draw"));
m_wndMyToolBar1.SetButtonText(4,_T("Animate"));
m_wndMyToolBar1.SetButtonText(5,_T("Moive"));
m_wndMyToolBar1.SetButtonText(6,_T("Mod"));//后面的就显示不出来了??
m_wndMyToolBar1.SetButtonText(7,_T("F"));
m_wndMyToolBar1.SetButtonText(8,_T("T"));m_wndMyToolBar1.SetSizes(CSize(32,32),CSize(8,8));
m_wndMyToolBar1.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndMyToolBar1);
为什么后面的就显示不出来了呢?尺寸设置问题么,该怎么设呢?
m_wndMyToolBar1.SetButtonText(6,_T("Mod"));//后面的就显示不出来了??
m_wndMyToolBar1.SetButtonText(7,_T("F"));
m_wndMyToolBar1.SetButtonText(8,_T("T"));
if (!m_wndMyToolBar1.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndMyToolBar1.LoadToolBar(IDR_TOOLBAR_STRUC1))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
} m_wndMyToolBar1.SetButtonText(0,_T("File"));
m_wndMyToolBar1.SetButtonText(1,_T("Edit"));
m_wndMyToolBar1.SetButtonText(2,_T("Display"));
m_wndMyToolBar1.SetButtonText(3,_T("Draw"));
m_wndMyToolBar1.SetButtonText(4,_T("Animate"));
m_wndMyToolBar1.SetButtonText(5,_T("Moive"));
m_wndMyToolBar1.SetButtonText(6,_T("Mod"));//后面的就显示不出来了??
m_wndMyToolBar1.SetButtonText(7,_T("F"));
m_wndMyToolBar1.SetButtonText(8,_T("T"));m_wndMyToolBar1.SetSizes(CSize(32,32),CSize(8,8));
m_wndMyToolBar1.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndMyToolBar1);
为什么后面的就显示不出来了呢?尺寸设置问题么,该怎么设呢?
m_wndMyToolBar1.SetButtonText(6,_T("Mod"));//后面的就显示不出来了??
m_wndMyToolBar1.SetButtonText(7,_T("F"));
m_wndMyToolBar1.SetButtonText(8,_T("T"));
解决方案 »
- VC GDI+ 如何把当前窗口画面转变为Bitmap对象
- 【如何截取CHAR* Buffer】
- 请教delete [] 和vector问题
- 为什么对话框中ontimer不起作用,而将对话框的属性从popup改为child,就起作用了?请教高手!
- 请教:如何建立一个dialog却不在任务栏上显示标题?
- 在对话框中将菜单项ENABLE/DISABLE问题!
- 100分挑战高手,关于VC++下的 OFFICE 开发问题??????敢来吗------嘿嘿嘿嘿!!!!
- dll不能被编译出来
- win7服务程序中怎么实现注销?
- 大家好,好多天没能上网,我回来了…
- CHttpFile发送数据?
- 对于“在没有VC环境的机器上不能运行程序的问题”发表一些看法,外加散分
1. 设计时,把dialog的长度拉宽一点,即给toolbar留出足够的宽度;
2. 在OnSize里处理