Guglielmo Calligaro
2009-09-03 06:48:43 UTC
I'm asking about the 2nd constructor.
CMFCRibbonButton(
UINT nID,
LPCTSTR lpszText,
HICON hIcon,
BOOL bAlwaysShowDescription=FALSE,
HICON hIconSmall=NULL,
BOOL bAutoDestroyIcon=FALSE,
BOOL bAlphaBlendIcon=FALSE
);
I want to use a 16x16 icon like this :
HICON hIcon =(HICON)LoadImage( AfxGetApp()->m_hInstance ,
MAKEINTRESOURCE(nID) , IMAGE_ICON , 16 , 16 , LR_SHARED );
CMFCRibbonButton* pBtnLine2Points = new CMFCRibbonButton( nID ,
_T("Line Two Points") , hIcon );
The icon is shown correctly but the button is still 32 x 32 .
I guess I must use the hIconSmall parameter of the constructor but how?
There is no example in MSDN, no description of the parameters, nothing!
Any help?
CMFCRibbonButton(
UINT nID,
LPCTSTR lpszText,
HICON hIcon,
BOOL bAlwaysShowDescription=FALSE,
HICON hIconSmall=NULL,
BOOL bAutoDestroyIcon=FALSE,
BOOL bAlphaBlendIcon=FALSE
);
I want to use a 16x16 icon like this :
HICON hIcon =(HICON)LoadImage( AfxGetApp()->m_hInstance ,
MAKEINTRESOURCE(nID) , IMAGE_ICON , 16 , 16 , LR_SHARED );
CMFCRibbonButton* pBtnLine2Points = new CMFCRibbonButton( nID ,
_T("Line Two Points") , hIcon );
The icon is shown correctly but the button is still 32 x 32 .
I guess I must use the hIconSmall parameter of the constructor but how?
There is no example in MSDN, no description of the parameters, nothing!
Any help?