Loading ...
Sorry, an error occurred while loading the content.

24 bit Imagelist for Listview

Expand Messages
  • Peter Carlson
    I am using the method outlined in alpha for loading 24 bit images into the toolbar, works fine. I want to do the same thing for some small icons I use in a
    Message 1 of 1 , Dec 2, 2007
    • 0 Attachment
      I am using the method outlined in alpha for loading 24 bit images into
      the toolbar, works fine. I want to do the same thing for some small
      icons I use in a listview. Here is the code. The problem is that the
      "clear" background is being displayed in all black.

      DWORD dwMajor = 0; DWORD dwMinor = 0;
      HRESULT hRet = AtlGetCommCtrlVersion(&dwMajor, &dwMinor);
      CImageList il;
      if(SUCCEEDED(hRet) && dwMajor >= 6) { // use 24bit
      il.Create(IDB_IMAGELIST_VOICE24, 16, 1, RGB(255,255,255));
      } else { // use 16 bit
      il.Create(IDB_IMAGELIST_VOICE, 16, 1, RGB(255,255,255));
      }
      _list.SetImageList(il, LVSIL_SMALL);
      il.Detach();


      Peter
    Your message has been successfully submitted and would be delivered to recipients shortly.