创建代码如下
CBCGPOutlookWnd::EnableAnimation ();
const int nInitialWidth = 150;
const CString strCaption = _T("Shortcuts");
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;
}
CBCGPToolBarImages images;
images.SetImageSize (CSize (32, 32));
BOOL bAlphaBlend = globalData.bIsOSAlphaBlendingSupport;
images.Load (bAlphaBlend ? IDB_SHORTCUTS32 : IDB_SHORTCUTS);
m_wndShortcutsPane1.Create (&m_wndShortcutsBar, dwDefaultToolbarStyle, ID_SHORTCUTS_PANE_1);
m_wndShortcutsPane1.SetOwner (this);
m_wndShortcutsPane1.EnableTextLabels(1);
m_wndShortcutsPane1.EnableDocking (CBRS_ALIGN_ANY);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (0), viewTypes[0], ID_SHORTCUT_1, -1, bAlphaBlend);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (1), viewTypes[1], ID_SHORTCUT_2, -1, bAlphaBlend);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (2), viewTypes[2], ID_SHORTCUT_3, -1, bAlphaBlend);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (3), viewTypes[3], ID_SHORTCUT_4, -1, bAlphaBlend);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (4), viewTypes[4], ID_SHORTCUT_5, -1, bAlphaBlend);
//
pShortcutsBarContainer->AddTab (&m_wndShortcutsPane1, strCaption, -1, FALSE);
return TRUE;
但是,运行之后显示出来的却是这个样子同时选择这个主题切换也不好用,大侠们知道为什么么?谢谢
CBCGPOutlookWnd::EnableAnimation ();
const int nInitialWidth = 150;
const CString strCaption = _T("Shortcuts");
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;
}
CBCGPToolBarImages images;
images.SetImageSize (CSize (32, 32));
BOOL bAlphaBlend = globalData.bIsOSAlphaBlendingSupport;
images.Load (bAlphaBlend ? IDB_SHORTCUTS32 : IDB_SHORTCUTS);
m_wndShortcutsPane1.Create (&m_wndShortcutsBar, dwDefaultToolbarStyle, ID_SHORTCUTS_PANE_1);
m_wndShortcutsPane1.SetOwner (this);
m_wndShortcutsPane1.EnableTextLabels(1);
m_wndShortcutsPane1.EnableDocking (CBRS_ALIGN_ANY);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (0), viewTypes[0], ID_SHORTCUT_1, -1, bAlphaBlend);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (1), viewTypes[1], ID_SHORTCUT_2, -1, bAlphaBlend);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (2), viewTypes[2], ID_SHORTCUT_3, -1, bAlphaBlend);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (3), viewTypes[3], ID_SHORTCUT_4, -1, bAlphaBlend);
m_wndShortcutsPane1.AddButton (images.ExtractIcon (4), viewTypes[4], ID_SHORTCUT_5, -1, bAlphaBlend);
//
pShortcutsBarContainer->AddTab (&m_wndShortcutsPane1, strCaption, -1, FALSE);
return TRUE;
但是,运行之后显示出来的却是这个样子同时选择这个主题切换也不好用,大侠们知道为什么么?谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货