title: Customizing Color with Windows Ribbon Framework
body: <p>I am attempting to change the ribbon color of a Windows Ribbon Framework based application. I am not a C++ developer, and I would consider my knowledge of C shaky at best. I do however grasp most of the ribbon XML markup.</p>
  
  <p>Other than custom ribbon xml markup, the application code I have matches what is produced from following the Microsoft development tutorial found here: <a href="https://go.microsoft.com/fwlink/p/?linkid=137046" rel="nofollow noreferrer">https://go.microsoft.com/fwlink/p/?linkid=137046</a>, or here: <a href="https://docs.microsoft.com/en-us/windows/win32/windowsribbon/windowsribbon-stepbystep" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows/win32/windowsribbon/windowsribbon-stepbystep</a></p>
  
  <p>Most of the developer guide's sample code works with what is produced from the linked tutorial. The code comments on the page on customizing color found here: <a href="https://docs.microsoft.com/en-us/windows/win32/windowsribbon/ribbon-color" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows/win32/windowsribbon/ribbon-color</a> mentions the code sample being used during ribbon initialization. I copied the sample code</p>
  
  <pre><code>CComPtr&lt;IPropertyStore&gt; spPropertyStore;
  if (SUCCEEDED(_spFramework-&gt;QueryInterface(&amp;spPropertyStore)))
  {
    ...
  }
  </code></pre>
  
  <p>into the </p>
  
  <pre><code>HRESULT InitRibbon(HWND hWindowFrame)
  {
    ...
  
    ---customize color---
  
  return S_OK;
  }
  </code></pre>
  
  <p>function of the Ribbon.cpp file.</p>
  
  <p>This produces a host of errors starting with 
  "identifier "_spFramework" is undefined"
  As I am not familiar with C++ or WIN32 development, I do not even know where to start to fix this.</p>
  
  <p>edit: added more of the customizing color sample code per Mori's comment</p>