title: Why am I getting black background when displaying a list-view icon?
body: <p>I'm not sure why I'm getting this black outline when I add an icon to the CListCtrl (or list-view control)?</p>
  
  <p><img src="https://i.stack.imgur.com/0shCw.png" alt="enter image description here"></p>
  
  <p>I load it as such:</p>
  
  <pre><code>//HICON hIcon;
  LoadIconWithScaleDown(theApp.m_hInstance, MAKEINTRESOURCE(Icon_ID), 15, 15, &amp;hIcon);
  </code></pre>
  
  <p>I then create my image list as such:</p>
  
  <pre><code>//CImageList iml;
  iml.Create(15, 15, ILC_COLOR32, numberIcons, 0);
  iml.Add(hIcon);
  </code></pre>
  
  <p>the list view is prepped first:</p>
  
  <pre><code>//CListCtrl lst;
  lst.SetExtendedStyle(LVS_EX_DOUBLEBUFFER | LVS_EX_FULLROWSELECT | 
      LVS_EX_LABELTIP | LVS_EX_HEADERDRAGDROP | LVS_EX_SUBITEMIMAGES);
  lst.ModifyStyle(0, LVS_SHOWSELALWAYS);
  </code></pre>
  
  <p>and the icon is displayed in the subitem of the list as such:</p>
  
  <pre><code>int nInd = lst.InsertItem(c, L"Main label");
  
  lst.SetItem(nInd, nSubitemIndex, LVIF_TEXT | LVIF_IMAGE, L"2 files", nIconInd, 0, 0, 0);
  </code></pre>
  
  <p>So what am I doing wrong?</p>
  
  <p>PS. I ran this test on my Windows 8.1 with a 32-bit trucolor display setting.</p>
  
  <p>The icon itself though is a 256-color image since I don't see any reason to waste space on a 32-bit icon with an alpha channel for such a small size &amp; simple design:</p>
  
  <p><img src="https://i.stack.imgur.com/U4h27.png" alt="enter image description here"></p>