我想在工具栏里显示图片和文字`可是文字显示得太低了``请教`` 贴子在www.vchelp里,地址:http://www.vchelp.net/cndevforum/subject_view.asp?subject_id=133392&forum_id=59谢谢`` 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 代码如下: int nIndex = 0;TBBUTTON tb; for (nIndex = m_wndToolBar.GetToolBarCtrl().GetButtonCount() - 1; nIndex >= 0; nIndex--) { ZeroMemory(&tb, sizeof(TBBUTTON)); m_wndToolBar.GetToolBarCtrl().GetButton(nIndex, &tb); if ((tb.fsStyle & TBSTYLE_SEP) == TBSTYLE_SEP) continue; if (tb.idCommand == 0) continue; CString strText; LPCTSTR lpszButtonText = NULL; CString strButtonText(_T("")); _TCHAR seps[] = _T("\n"); strText.LoadString(tb.idCommand); if (!strText.IsEmpty()) { lpszButtonText = _tcstok((LPTSTR)(LPCTSTR)strText, seps); while(lpszButtonText) { strButtonText = lpszButtonText; lpszButtonText = _tcstok(NULL, seps); } } if (!strButtonText.IsEmpty()) m_wndToolBar.SetButtonText(nIndex, strButtonText); } 你可以参考一下这个http://www.vckbase.com/document/viewdoc/?id=726 我参考了``还是不行``汗`不知道搞啥问题``问题是出在这三句话: a.Add(AfxGetApp()->LoadIcon(IDR_ABVV33TYPE)); a.Add(AfxGetApp()->LoadIcon(IDR_MAINFRAME)); m_wndToolBar.GetToolBarCtrl().SetImageList(&a);郁闷`` 求助!为什么不能这样构造构造函数? 如何获取当前用户目录 对WSAWaitForMultipleEvents()函数的fAlertable参数的小问题 问个问题, cpu 100%的问题。 办完离职手续了,可能一段时期内不能来了,散分~~ ==编程的人有福了== 3G电子书下载!!!【下载】 用vc作图(柱状图),急求! C++有变长数组吗? 真的很急于找到答案,请各位帮帮忙吧。 MFC简单的聊天室该如何才能够做到一对一的聊天功能? 完成端口 超时问题 散分
int nIndex = 0;TBBUTTON tb; for (nIndex = m_wndToolBar.GetToolBarCtrl().GetButtonCount() - 1; nIndex >= 0; nIndex--)
{
ZeroMemory(&tb, sizeof(TBBUTTON));
m_wndToolBar.GetToolBarCtrl().GetButton(nIndex, &tb); if ((tb.fsStyle & TBSTYLE_SEP) == TBSTYLE_SEP)
continue; if (tb.idCommand == 0)
continue; CString strText;
LPCTSTR lpszButtonText = NULL;
CString strButtonText(_T(""));
_TCHAR seps[] = _T("\n");
strText.LoadString(tb.idCommand); if (!strText.IsEmpty())
{
lpszButtonText = _tcstok((LPTSTR)(LPCTSTR)strText, seps); while(lpszButtonText)
{
strButtonText = lpszButtonText;
lpszButtonText = _tcstok(NULL, seps);
}
} if (!strButtonText.IsEmpty())
m_wndToolBar.SetButtonText(nIndex, strButtonText);
}
a.Add(AfxGetApp()->LoadIcon(IDR_ABVV33TYPE));
a.Add(AfxGetApp()->LoadIcon(IDR_MAINFRAME)); m_wndToolBar.GetToolBarCtrl().SetImageList(&a);郁闷``