srikadi
asked on
How to add separator to CToolBar?
Hi,
i added some button in CtoolBar after separator.but it s not showing names for the buttons.
now i have separator before IDS_ENABLESCAN id which isTBBS_CHECKGROUP.but i was adding simple buttons after sepearator.with out separator its working fine..
CDC* dc = m_mainToolBar.GetDC();
CSize size;
size = dc->GetTextExtent("Test");
button.cy += size.cy;
m_mainToolBar.SetSizes(but ton,bitmap );
//setting the buttons to be radio style
int i =0;
while ( !(m_mainToolBar.GetButtonS tyle(i) & TBBS_SEPARATOR) )
{
m_mainToolBar.SetButtonSty le(i,TBBS_ CHECKGROUP );
buttonText.LoadString(tool barTextIds [index]);
m_mainToolBar.SetButtonTex t(i,button Text);
index++;
i++;
}
//the following buttons is used to start/pause the network scanning
//Ramesh - TL_C1_4_FEA_09 - XC Support of IP DCN Mgmt - Start
m_mainToolBar.SetButtonSty le(7,TBBS_ CHECKBOX);
buttonText.LoadString(IDS_ ENABLESCAN );
m_mainToolBar.SetButtonTex t(7,button Text);
//Ramesh - TL_C1_4_FEA_09 - XC Support of IP DCN Mgmt - End
CSize tbSize;
tbSize.cy = button.cy;
tbSize.cx = 0;
CRect butRect;
for (i=0;i<m_mainToolBar.GetCo unt();i++)
{
m_mainToolBar.GetItemRect( i, butRect);
tbSize.cx += butRect.Width();
}
return tbSize;
static UINT toolbarTextIds[] =
{
//Ramesh - TL_C1_4_FEA_012 - Usability Enhancements - Start
IDS_TOOLBAR_NW,
IDS_TOOLBAR_SWPL,
IDS_TOOLBAR_TSK,
IDS_TOOLBAR_ERR ,
IDS_TOOLBAR_LOGS,
IDS_NODE_SOFTVIEW,
IDS_ENABLESCAN
};
so please to add sepatrator between buttons..
i added some button in CtoolBar after separator.but it s not showing names for the buttons.
now i have separator before IDS_ENABLESCAN id which isTBBS_CHECKGROUP.but i was adding simple buttons after sepearator.with out separator its working fine..
CDC* dc = m_mainToolBar.GetDC();
CSize size;
size = dc->GetTextExtent("Test");
button.cy += size.cy;
m_mainToolBar.SetSizes(but
//setting the buttons to be radio style
int i =0;
while ( !(m_mainToolBar.GetButtonS
{
m_mainToolBar.SetButtonSty
buttonText.LoadString(tool
m_mainToolBar.SetButtonTex
index++;
i++;
}
//the following buttons is used to start/pause the network scanning
//Ramesh - TL_C1_4_FEA_09 - XC Support of IP DCN Mgmt - Start
m_mainToolBar.SetButtonSty
buttonText.LoadString(IDS_
m_mainToolBar.SetButtonTex
//Ramesh - TL_C1_4_FEA_09 - XC Support of IP DCN Mgmt - End
CSize tbSize;
tbSize.cy = button.cy;
tbSize.cx = 0;
CRect butRect;
for (i=0;i<m_mainToolBar.GetCo
{
m_mainToolBar.GetItemRect(
tbSize.cx += butRect.Width();
}
return tbSize;
static UINT toolbarTextIds[] =
{
//Ramesh - TL_C1_4_FEA_012 - Usability Enhancements - Start
IDS_TOOLBAR_NW,
IDS_TOOLBAR_SWPL,
IDS_TOOLBAR_TSK,
IDS_TOOLBAR_ERR ,
IDS_TOOLBAR_LOGS,
IDS_NODE_SOFTVIEW,
IDS_ENABLESCAN
};
so please to add sepatrator between buttons..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanx..