如图,鼠标滑到字体,左边会出现一个图标。左边图标可以点击,右边的不行。MainFrm.cpp部分代码如下:
void CMainFrame::InitializeOutlookBar(){
// Create the image lists used by the outlook bar.
m_ImageLarge.Create(48, 48, ILC_COLOR32 | ILC_MASK, 2, 2);
for (int i = 0; i<5; i++) {
m_ImageLarge.Add(AfxGetApp()->LoadIcon(nIcons[i]));
}
int iFolder;//folder索引
// set the image lists for the outlook bar.
m_wndOutlookBar.SetImageList(&m_ImageLarge, OBS_XT_LARGEICON);
// Add items to the Outlook Bar control.
// Add the first folder to the outlook bar.
iFolder = m_wndOutlookBar.AddFolder(_T("记录管理"), 0);
m_wndOutlookBar.InsertItem(iFolder, 0, _T("高层管理"), 0, NULL);
m_wndOutlookBar.InsertItem(iFolder, 1, _T("记录算理"), 1, NULL);
m_wndOutlookBar.SetOwner(this);
}