title: Changing picture of tool button at runtime does not work anymore
body: <p>I have a tool bar and I am using the following procedure to change the color of a rectangle in one of the tool buttons. The <code>ColorDepth</code> of the ImageList is <code>cl24Bit</code> and the <code>DrawingStyle</code> is <code>dsTransparent</code>. The procedure works fine.</p>
  
  <pre><code>procedure TANewMain.BtReplaceHighOnClick(Sender: TObject);
  var
    ABitmap: TBitmap;
    ARect: TRect;
  begin
    ABitmap := TBitmap.Create;
    try
      ImgList.GetBitmap(1, ABitmap);
      ABitmap.Canvas.Brush.Color := ColorToRGB(clRed); // S04
      ABitmap.Canvas.Pen.Color := ColorToRGB(clBlue);
      ARect := Rect(5, 1, 11, 15);
      ABitmap.Canvas.Rectangle(ARect);
      ImgList.ReplaceMasked(1, ABitmap, clWhite);
    finally
      ABitmap.Free;
    end;
  end;
  </code></pre>
  
  <p>If I add the program to the repository for reuse it works fine. However, if I start a new program from scratch and use the exact same procedure, I get a white button. I made sure that the properties for the image list and the tool bar are the same in both  programs.  The program that works was written some time ago. Could the problem have anything to do with Windows updates? I am using Windows 10 and Delphi 10.</p>