CodePudding user response:
M_wndToolBar1. CreateEx (this, TBSTYLE_FLAT WS_CHILD | WS_VISIBLE |CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS |
CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
//CMD ID
UINT IDArray []={ID_BT_1 ID_SEPARATOR, ID_BT_2, ID_SEPARATOR,
ID_BT_3 ID_SEPARATOR, ID_BT_4 ID_SEPARATOR,
ID_BT_5 ID_SEPARATOR, ID_BT_6 ID_SEPARATOR,
ID_BT_7 ID_SEPARATOR, ID_BT_8 ID_SEPARATOR, ID_BT_9};
Int nIDCount=sizeof (IDArray)/sizeof (UINT);
M_wndToolBar1. SetButtons (IDArray nIDCount);
For (int jj=0; Jj
M_wndToolBar1. SetSizes (CSize (28, 28), CSize (1, 1));//ICONS only 1
If (m_wndToolBar1. GetButtonStyle (jj)==TBBS_SEPARATOR) continue;
M_wndToolBar1. SetButtonText (jj, "test");
}
CodePudding user response:
Although does not display the icon, but the height of the button becomes, if can not only keep the button, can let the ICONS don't show is perfectCodePudding user response:
SetSizes ( CSize (28, 28) , CSize height (1, 1)//buttonCodePudding user response: