We have a Word add-in implemented in C ++ as a COM add-in. Our tape group is loaded using the GetCustomUI callback. When Word 2010 displays our ribbon group in a minimized layout, only the default icon is displayed.
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnLoad"> <ribbon> <tabs> <tab idMso="TabReviewWord"> <group id="MyGroup" label="My AddIn" getImage="GetGroupImage" insertAfterMso="GroupProofing" > ....... STDMETHODIMP CWordPlugIn::GetGroupImage(IDispatch* pRibbon, IPictureDisp** ppdispImage) { return GetImage(GetGroupIcon(16), ppdispImage); }; HRESULT CWordPlugIn::GetImage(HICON hIcon, IPictureDisp** ppdispImage) { PICTDESC pd; memset(&pd, 0, sizeof(pd)); pd.cbSizeofstruct = sizeof(pd); pd.picType = PICTYPE_ICON; pd.icon.hicon = hIcon; if ( pd.icon.hicon == NULL ) { return E_INVALIDARG; }; HRESULT hRes = OleCreatePictureIndirect(&pd, IID_IPictureDisp, FALSE, (LPVOID *) ppdispImage); if ( hRes != S_OK ) {
When I do not define a getImage callback for a group, the collapsed group shows the default Microsoft icon. When I define the getImage callback, my icon is not displayed, just an empty image. The same callback works fine for button icons. How to identify the group softkey that is displayed for collapsed groups? I tried both 16 and 32 pixel icons.
source share