• 0

SetImageList() don


Question

Look at this:

CImageList  *m_pimagelist = new CImageList();
m_pimagelist->Create( 16, 16, ILC_COLOR8, 0, 4);

HICON icon = AfxGetApp()->LoadIcon( IDI_ICON1 );
if( icon == NULL )
; // This Doesn?t happen

int ret = m_pimagelist->Add( icon );
ret = m_pimagelist->Add( icon );
 ret = m_pimagelist->Add( icon );

int count = m_pimagelist->GetImageCount();

// count is now correctly == 3
// So far so good

SetImageList( m_pimagelist, TVSIL_NORML );

CImageList *p = GetImageList(TVSIL_NORML);

if( p == NULL )
; // THIS HAPPENS!!

How come that ?SetImageList( m_pimagelist, TVSIL_NORML )? Doesn?t work?

All suggestions are welcomed!!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.