John Beach
May 16th, 1999, 11:58 PM
I want to add one of my Icons to the System ImageList on Windows NT v4 sp4. I'm building a CListCtrl view similar to Explorer, but want to use my own icons in addition to the system icons. I'm using the "Attaching System ImageList to ListControl" article here on CodeGury as my guideline for retrieving the system imagelist.
My problem centers around Windows NT's refusal to send the true image quantity when I do a GetImageCount(). I can add a new icon, but it throws the index out of order. From that icon forward every icon I retrieve is incorrect.
My procedure works perfectly for Windows 95/98. Here's a snippet of my code that expands the imagelist and adds my new icon.
// Bump the ImageList count, then add my icon to the system ImageList.
int nImageCount = m_SystemImageList.GetImageCount();
m_SystemImageList.SetImageCount(nImageCount+1);
nSmile = m_SystemImageList.Replace(nImageCount, hIcon);
Is there some other way to grab all the system icons on Windows NT?
Thanks for any help.
---
John Beach
My problem centers around Windows NT's refusal to send the true image quantity when I do a GetImageCount(). I can add a new icon, but it throws the index out of order. From that icon forward every icon I retrieve is incorrect.
My procedure works perfectly for Windows 95/98. Here's a snippet of my code that expands the imagelist and adds my new icon.
// Bump the ImageList count, then add my icon to the system ImageList.
int nImageCount = m_SystemImageList.GetImageCount();
m_SystemImageList.SetImageCount(nImageCount+1);
nSmile = m_SystemImageList.Replace(nImageCount, hIcon);
Is there some other way to grab all the system icons on Windows NT?
Thanks for any help.
---
John Beach