Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Constructs a CMFCColorPopupMenu object.
CMFCColorPopupMenu(
   const CArray<COLORREF, COLORREF>& colors,
   COLORREF color,
   LPCTSTR lpszAutoColor,
   LPCTSTR lpszOtherColor,
   LPCTSTR lpszDocColors,
   CList<COLORREF, COLORREF>& lstDocColors,
   int nColumns,
   int nHorzDockRows,
   int nVertDockColumns,
   COLORREF colorAutomatic,
   UINT uiCommandID,
   BOOL bStdColorDlg = FALSE
);
CMFCColorPopupMenu(
   CMFCColorButton* pParentBtn,
   const CArray<COLORREF, COLORREF>& colors,
   COLORREF color,
   LPCTSTR lpszAutoColor,
   LPCTSTR lpszOtherColor,
   LPCTSTR lpszDocColors,
   CList<COLORREF, COLORREF>& lstDocColors,
   int nColumns,
   COLORREF colorAutomatic
);
CMFCColorPopupMenu(
   CMFCRibbonColorButton* pParentBtn,
   const CArray<COLORREF, COLORREF>& colors,
   COLORREF color,
   LPCTSTR lpszAutoColor,
   LPCTSTR lpszOtherColor,
   LPCTSTR lpszDocColors,
   CList<COLORREF, COLORREF>& lstDocColors,
   int nColumns,
   COLORREF colorAutomatic,
   UINT nID
);
Parameters
- [in] colors 
 An array of colors that the framework displays on the pop-up menu.
- [in] color 
 The default selected color.
- [in] lpszAutoColor 
 The text label of the automatic (default) color button, or NULL.- The standard label for the automatic button is Automatic. 
- [in] lpszOtherColor 
 The text label of the other button, which displays more color choices, or NULL.- The standard label for the other button is More Colors.... 
- [in] lpszDocColors 
 The text label of the document colors button. The document colors palette lists all the colors that the document currently uses.
- [in] lstDocColors 
 A list of colors that the document currently uses.
- [in] nColumns 
 The number of columns that the array of colors has.
- [in] nHorzDockRows 
 The number of rows that the color bar has when it is docked horizontally.
- [in] nVertDockColumns 
 The number of columns that the color bar has when it is docked vertically.
- [in] colorAutomatic 
 The default color that the framework applies when you click the automatic button.
- [in] uiCommandID 
 The color bar control command ID.
- [in] bStdColorDlg 
 A Boolean that indicates whether to show the standard system color dialog box or the CMFCColorDialog dialog box.
- [in] pParentBtn 
 A pointer to a parent button.
- [in] nID 
 The command ID.
Remarks
Each overloaded constructor sets the m_bEnabledInCustomizeMode member to FALSE.
Example
The following example demonstrates how to construct a CMFCColorPopupMenu object.
    COLORREF color;
    CArray<COLORREF, COLORREF> colors;
    CString strAutoColorText;
    CString strOtherText;
    CString strDocColorsText;
    CList<COLORREF,COLORREF> lstDocColors;
    COLORREF colorAutomatic;
    int nColumns;
    CMFCColorButton colorButton;
    CMFCColorPopupMenu* pPopup = new CMFCColorPopupMenu(&colorButton, colors, color, strAutoColorText, strOtherText, strDocColorsText, lstDocColors, nColumns, colorAutomatic);
Requirements
Header: afxcolorpopupmenu.h