次の方法で共有


CMFCRibbonGalleryMenuButton クラス

リボン ギャラリーを含むリボン メニュー ボタンを実装します。

class CMFCRibbonGalleryMenuButton : public CMFCToolBarMenuButton

メンバー

Bb983166.collapse_all(ja-jp,VS.110).gifパブリック コンストラクター

名前

説明

CMFCRibbonGalleryMenuButton::CMFCRibbonGalleryMenuButton

CMFCRibbonGalleryMenuButton オブジェクトを構築し、初期化します。

Bb983166.collapse_all(ja-jp,VS.110).gifパブリック メソッド

名前

説明

CMFCRibbonGalleryMenuButton::CopyFrom

  (CMFCToolBarMenuButton::CopyFrom をオーバーライドします。)

CMFCRibbonGalleryMenuButton::CreatePopupMenu

  (CMFCToolBarMenuButton::CreatePopupMenu をオーバーライドします。)

CMFCRibbonGalleryMenuButton::GetPalette

 

CMFCRibbonGalleryMenuButton::HasButton

  (CMFCToolBarMenuButton::HasButton をオーバーライドします。)

CMFCRibbonGalleryMenuButton::IsEmptyMenuAllowed

  (CMFCToolBarMenuButton::IsEmptyMenuAllowed をオーバーライドします。)

Bb983166.collapse_all(ja-jp,VS.110).gif解説

ギャラリーのメニュー ボタンは、矢印の付いたポップアップ メニューとして表示されます。ユーザーがこのボタンをクリックすると、イメージのギャラリーが表示されます。ギャラリー メニュー ボタンを構築するときは、それらのイメージが含まれるイメージ リストを指定する必要があります。

使用例

メニュー ボタンで箇条書きのギャラリーを表示する方法を次の例に示します。

BOOL CMainFrame::OnShowPopupMenu (CMFCPopupMenu* pMenuPopup)
{
    int nBulletIndex = pMenuBar->CommandToIndex (ID_PARA_BULLETS);
    if (nBulletIndex >= 0)
    {
        CMFCToolBarButton* pExButton =
            pMenuBar->GetButton(nBulletIndex);
        ASSERT_VALID (pExButton);
        CMFCRibbonGalleryMenuButton paletteBullet (
            pExButton->m_nID,
            pExButton->GetImage (),
            pExButton->m_strText);
        InitBulletPalette (&paletteBullet.GetPalette ());
        pMenuBar->ReplaceButton (ID_PARA_BULLETS, paletteBullet);
    }
}

継承階層

CObjectCMFCToolBarButtonCMFCToolBarMenuButtonCMFCRibbonGalleryMenuButton

必要条件

ヘッダー : afxRibbonPaletteGallery.h

参照

関連項目

階層図

CMFCToolBarMenuButton クラス

CMFCRibbonGallery クラス

その他の技術情報

MFC クラス