Partilhar via


CMFCOutlookBarPane::AddButton

Adds a button to the Outlook bar pane.

BOOL AddButton(
   UINT uiImage,
   LPCTSTR lpszLabel,
   UINT iIdCommand,
   int iInsertAt=-1 
);
BOOL AddButton(
   UINT uiImage,
   UINT uiLabel,
   UINT iIdCommand,
   int iInsertAt=-1 
);
BOOL AddButton(
   LPCTSTR szBmpFileName,
   LPCTSTR szLabel,
   UINT iIdCommand,
   int iInsertAt=-1 
);
BOOL AddButton(
   HBITMAP hBmp,
   LPCTSTR lpszLabel,
   UINT iIdCommand,
   int iInsertAt=-1 
);
BOOL AddButton(
   HICON hIcon,
   LPCTSTR lpszLabel,
   UINT iIdCommand,
   int iInsertAt=-1,
   BOOL bAlphaBlend=FALSE 
);

Parameters

  • [in] uiImage
    Specifies the resource identifier of a bitmap.

  • [in] lpszLabel
    Specifies the button's text.

  • [in] iIdCommand
    Specifies the button control's ID.

  • [in] iInsertAt
    Specifies the zero-based index on the outlook bar's page at which to insert the button.

  • [in] uiLabel
    A string resource ID.

  • [in] szBmpFileName
    Specifies the name of the disk image file to load.

  • [in] szLabel
    Specifies the button's text.

  • [in] hBmp
    A handle to a button's bitmap.

  • [in] hIcon
    A handle to a buttons' icon.

Return Value

TRUE if a button was added successfully; otherwise FALSE.

Remarks

Use this method to insert a new button into an Outlook bar's page. The button's image can be loaded either from the application resources or from a disk file.

If the page ID specified by uiPageID is -1, the button is inserted into the first page.

If the index specified by iInsertAt is -1, the button is added at the end of the page.

Requirements

Header: afxoutlookbarpane.h

See Also

Reference

CMFCOutlookBarPane Class

Hierarchy Chart