Results 1 to 3 of 3

Thread: List View Icons

Threaded View

  1. #1

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024

    List View Icons

    I have a list view that I am listing files in a directory along their the corresponding icons. The problem I have is that some of the icons are not getting a transparent background (see attached).

    The window is a modal dialog with the ListView control on it.

    I am using:
    g_hImageLst = ImageList_Create(16,16,ILC_MASK | ILC_COLORDDB, 1, 0);
    To setup my ImageList

    I am using:
    ListView_SetExtendedListViewStyle(hWnd,LVS_EX_SUBITEMIMAGES);
    To setup the list view

    Then:
    SHGetFileInfo(dirInfo.cFileName,FILE_ATTRIBUTE_NORMAL, &shInfo, sizeof(shInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ICON | SHGFI_SMALLICON);
    To Get The Files Icon

    Finally:
    ImageList_AddIcon(g_hImageLst, hIcon );
    ListView_SetImageList(m_hWnd, g_hImageLst, LVSIL_SMALL)
    To push the icons on the list and set the list.

    Any suggestions on how to fix the icons so they look better?
    Attached Images Attached Images  
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width