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!!
______________________________________________________
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!!