title: Changing TBitBtn Glyph at runtime
body: <p>I have a VCL form with a TBitBtn on it and an TImageList containing 2 bitmaps. At runtime i run the following line of code to put one of the bitmaps on my TBitBtn: </p>
  
  <pre><code>ImageList1-&gt;GetBitmap(1, BitBtn1-&gt;Glyph);
  </code></pre>
  
  <p>This succesfully puts the bitmap on the TBitBtn.  Then later i run the following line of code to change the bitmap and nothing happens:</p>
  
  <pre><code>ImageList1-&gt;GetBitmap(0, BitBtn1-&gt;Glyph);
  </code></pre>
  
  <p>Both bitmaps are present in the imagelist (0 and 1).  I can swap the lines of code and prove nothing wrong with the imagelist.    <a href="https://www.tek-tips.com/viewthread.cfm?qid=211573" rel="nofollow noreferrer">Here is</a> an old post where a guy seems to solve this in Delphi. I'm thinking i must need to somehow clear the Glyph first but i don't know how in C++.</p>