How to get the text of the button on the ctoolbarctrl?
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi: How to get the text of the button on the ctoolbarctrl?I try:CToolBarCtrl::GetButtonInfo(),but the text it returns is always empty. TBBUTTONINFO tbinfo; char szBuf[100]; tbinfo.cbSize = sizeof (TBBUTTONINFO); tbinfo.dwMask =TBIF_IMAGE|TBIF_STYLE|TBIF_TEXT; tbinfo.pszText = szBuf; tbinfo.cchText = 100; cTbCtrl->GetButtonInfo(pInfo->dwItemSpec,&tbinfo);//(CToolBarCtrl * cTbCtrl) but the szBuf is always empty.How should I do? Thanks Benben