CBCGPRibbonPanel* CBCGPRibbonCategory::AddPanel | ( | LPCTSTR | lpszPanelName, |
HICON | hIcon = 0 , |
||
CRuntimeClass * | pRTI = NULL , |
||
BOOL | bAutoDestroyIcon = TRUE , |
||
int | nInsertAt = -1 |
||
) |
Adds a new panel to category.
The category creates a panel internally. If you wish to add a custom panel, you must specify its runtime class information by pRTI.
Custom panel class must be derived from CBCGPRibbonPanel and declared as DECLARE_DYNCREATE.
lpszPanelName | Specifies panel name (to be displayed on the tab). |
hIcon | A handle to icon, which will be displayed if panel is placed on Quick Access Toolbar and if panel is stretched to its minimum size. |
pRTI | Specifies runtime class information for custom panels. |
bAutoDestroyIcon | Specifies whether the category takes ownership on icon and destroys it. |
nInsertAt | Specifies an index in the list of categories to insert at. if the index is -1, the new category is inserted at the end. |