N
NickP
Hi there,
I've just seen a video, and read quite allot of articles saying how to
use a custom image for Ribbon button in .NET. Unfortunately I am using
VC2005, so cannot do this, how would I specify a custom bitmap?
STDMETHODIMP CConnect::raw_GetCustomUI(BSTR RibbonID, BSTR * RibbonXml)
{
if (!RibbonXml) return E_POINTER;
*RibbonXml = SysAllocString(L"<customUI
xmlns=\"http://schemas.microsoft.com/office/2006/01/customui\">"
L" <ribbon>"
L" <tabs>"
L" <tab id=\"my tab\""
L" label=\"my tab\">"
L" <group id=\"my ribbon\""
L" label=\"my ribbon\">"
L" <button id=\"foobar\""
L" image=\"<what do I enter here?>\""
L" size=\"large\""
L" label=\"foobar...\""
L" onAction=\"ButtonClicked\"/>"
L" </group>"
L" </tab>"
L" </tabs>"
L" </ribbon>"
L"</customUI>"
);
return (*RibbonXml ? S_OK : E_OUTOFMEMORY);
}
I'm thinking that I might have to use a callback, but again, I cannot
find any C++ examples of doing this. Many thanks in advance for your time
and help.
Nick.
I've just seen a video, and read quite allot of articles saying how to
use a custom image for Ribbon button in .NET. Unfortunately I am using
VC2005, so cannot do this, how would I specify a custom bitmap?
STDMETHODIMP CConnect::raw_GetCustomUI(BSTR RibbonID, BSTR * RibbonXml)
{
if (!RibbonXml) return E_POINTER;
*RibbonXml = SysAllocString(L"<customUI
xmlns=\"http://schemas.microsoft.com/office/2006/01/customui\">"
L" <ribbon>"
L" <tabs>"
L" <tab id=\"my tab\""
L" label=\"my tab\">"
L" <group id=\"my ribbon\""
L" label=\"my ribbon\">"
L" <button id=\"foobar\""
L" image=\"<what do I enter here?>\""
L" size=\"large\""
L" label=\"foobar...\""
L" onAction=\"ButtonClicked\"/>"
L" </group>"
L" </tab>"
L" </tabs>"
L" </ribbon>"
L"</customUI>"
);
return (*RibbonXml ? S_OK : E_OUTOFMEMORY);
}
I'm thinking that I might have to use a callback, but again, I cannot
find any C++ examples of doing this. Many thanks in advance for your time
and help.
Nick.