Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to load custom images on RibbonX?

How to load custom images on RibbonX?

Scheduled Pinned Locked Moved C / C++ / MFC
comtutorialquestionlounge
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eight
    wrote on last edited by
    #1

    I'm trying to use my own image (.png) as a ribbon button. I've managed to place a windows icon on my custom button using this code <code> STDMETHODIMP CConnect::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"<officeMenu>"    L"<menu idMso=\"FileSendMenu\">"    L"<button id=\"OfficeButton1\" imageMso=\"HappyFace\" label=\"Happy Print\" description=\"Prints a random joke in the footer of each document\" onAction=\"ButtonClicked\"/>"    L"</menu>"    L"</officeMenu>"    L"</ribbon>"    L"</customUI>"    );    return (*RibbonXml ? S_OK : E_OUTOFMEMORY); } </code> From what I've googled, I'm supposed to create GetImage or LoadImage callbacks. How to do this?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups