Skip to main content
GameDev.net gamedev.net
🔒 Locked

ListCtrl and SetImageList help

Started by Zeke Aug 15, 2001 at 9:09 AM 1 replies 750+ views
Original Post
Zeke
Zeke
In my MFC app I want to display images in a CListCtrl. That part is easy however when i loop through the images to display and insert them I want to use a different ImageList depending on what x is. E.g.

for (x=0;x(is less than)NumImages*2;x++)
{
    if (x%2==0)
    {
        PoseListCtrl->SetImageList(&PoseImageList, LVSIL_NORMAL);
        //insert items from this image list 
    }
    else 
    {
        PoseListCtrl->SetImageList(&ImageListPose,LVSIL_NORMAL);
        //insert items from this image list
    }
}

  
However If I do this I end up with no images at all being displayed yet it still displays the text of each item and in the correct position. I need to do this because the image list in the else part (ImageListPose)uses an image (just one image) much smaller than those in the first CImageList and I dont think you can use images of different sizes in 1 image list. Can anyone help me with this? Either tell me why my code isnt working or suggest an alternative solution? Thanks for any help edit: how do you use triangular brackets? I keep having to change the less than symbol into (less than) Edited by - Zeke on August 15, 2001 10:17:36 AM
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Kylotan
Kylotan
Use < for less than and > for greater than. (These are HTML character representations.)
Zeke
Zeke
Ok cheers Kylotan
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.