日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

BCGControlBar教程:Outlook Bars

發布時間:2025/3/21 编程问答 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 BCGControlBar教程:Outlook Bars 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

BCGControlBar?Library框架支持Outlook樣式的快捷方式控制欄。 您可以使用這些欄來增強應用程序中的工作區管理。

快捷方式欄具有以下元素:

  • 標題 - 顯示當前選擇的頁面名稱

  • 帶快捷按鈕或嵌入式控件的頁面

  • 頁面和頁面按鈕之間的拆分器

  • 左側有頁面名稱和圖標的頁面按鈕

  • 位于底部的工具欄,帶有頁面小圖標和選項菜單

“outlook”控制條的功能由CBCGPOutlookBar類提供。 要使用此課程,請執行以下步驟:

  • 將Outlook頁面大圖標列表添加到您的應用程序資源(建議的圖標大小為24x24。例如,資源ID將為IDB_PAGES。

  • 將Outlook頁面小圖標列表(將顯示在位于底部的工具欄上)添加到您的應用程序資源(建議的圖標大小為16x16)。 例如,資源ID將是IDB_PAGES_SMALL。

  • 為每個快捷方式(IDI_SHORTCUT1,IDI_SHORTCUT1,...)準備圖標。

  • 將以下成員添加到您的CMainFrame類:

  • CBCGPOutlookBar m_wndShortcutsBar;

  • CBCGPOutlookBarPane m_wndShortcutsPane1;

  • CBCGPOutlookBarPane??m_wndShortcutsPane2;

  • 通過以下方式初始化CMainFrame :: OnCreate中的快捷方式欄:

    CBCGPOutlookWnd::EnableAnimation ();

    const?int?nInitialWidth = 150;
    const?CString strCaption = _T("Shortcuts");

    m_wndShortcutsBar.SetMode2003();

    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;
    }

    pShortcutsBarContainer->SetImageList(IDB_PAGES, 24);
    pShortcutsBarContainer->SetToolbarImageList(IDB_PAGES_SMALL, 16);

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

    m_wndShortcutsPane1.AddButton (theApp.LoadIcon(IDI_SHORTCUT1), _T("Shortcut 1"),
    ???? ID_SHORTCUT_1);
    m_wndShortcutsPane1.AddButton (theApp.LoadIcon(IDI_SHORTCUT2), _T("Shortcut 2"),
    ???? ID_SHORTCUT_2);

    pShortcutsBarContainer->AddTab (&m_wndShortcutsPane1, _T("Page 1"), 0, FALSE);
    m_wndShortcutsPane1.EnableDocking (CBRS_ALIGN_ANY);

    // Create second page:
    m_wndShortcutsPane2.Create (&m_wndShortcutsBar,? dwDefaultToolbarStyle,
    ??? ID_SHORTCUTS_PANE_2);

    m_wndShortcutsPane2.SetOwner (this);
    m_wndShortcutsPane2.EnableTextLabels ();
    m_wndShortcutsPane2.EnableDocking (CBRS_ALIGN_ANY);

    m_wndShortcutsPane2.AddButton (theApp.LoadIcon(IDI_SHORTCUT3), _T("Shortcut 3"),
    ??? ID_SHORTCUT_3);
    m_wndShortcutsPane2.AddButton (theApp.LoadIcon(IDI_SHORTCUT4), _T("Shortcut 4"),
    ??? ID_SHORTCUT_4);

    pShortcutsBarContainer->AddTab (&m_wndShortcutsPane2, _T("Page 2"), 1, FALSE);


  • 轉載于:https://blog.51cto.com/14048826/2325706

    總結

    以上是生活随笔為你收集整理的BCGControlBar教程:Outlook Bars的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。