BCG界面库Outlookbar的问题

来源:百度文库 编辑:神马文学网 时间:2024/04/29 16:16:51

BCG界面库Outlookbar的问题

 

我用下列代码建立了一个BCG界面的OutlookBar:
if (!m_wndShortcutsBar.Create (strCaption, this,
CRect (0, 0, nInitialWidth, nInitialWidth),
ID_VIEW_OUTLOOKBAR, WS_CHILD | WS_VISIBLE | CBRS_LEFT))
{
TRACE0("Failed to create outlook bar\n");
return FALSE;      // fail to create
}

CBCGPOutlookWnd* pShortcutsBarContainer = DYNAMIC_DOWNCAST (CBCGPOutlookWnd,
m_wndShortcutsBar.GetUnderlinedWindow ());
if (pShortcutsBarContainer == NULL)
{
TRACE0("Cannot get outlook bar container\n");
return FALSE;
}

CImageList images;
images.Create (IDB_SHORTCUTS, 32, 0, RGB (255, 0, 255));

// Create first page:
m_wndShortcutsPane1.Create (&m_wndShortcutsBar, dwDefaultToolbarStyle, ID_SHORTCUTS_PANE_1);
m_wndShortcutsPane1.SetOwner (this);
m_wndShortcutsPane1. EnableTextLabels(FALSE);
m_wndShortcutsPane1.EnableDocking (CBRS_ALIGN_ANY);

m_wndShortcutsPane1.AddButton (images.ExtractIcon (0), _T("百度新歌TOP100"), ID_SHORTCUT_1);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (1), _T("百度歌曲TOP500"), ID_SHORTCUT_2);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (1), _T("百度电影金曲"), ID_SHORTCUT_3);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (2), _T("百度电视金曲"), ID_SHORTCUT_4);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (2), _T("百度经典老歌"), ID_SHORTCUT_5);
pShortcutsBarContainer->AddTab (&m_wndShortcutsPane1, _T("歌曲搜索"), 0, FALSE);
m_wndShortcutsPane1.EnableDocking (CBRS_ALIGN_ANY);

生成的OutlookBar都是大图标的,怎么用小图标形式显示呢?就像QQ一样图标在左文字在右那样。
----------------------------------------------------------------------------------------方法:images.Create (IDB_SHORTCUTS, 16, 16, RGB (255, 0, 255));//将图标改成16*16