往CImageList中加图标列表

m_imageList.Create(16, 16, 0, 8, 8); // 32, 32 for large icons
 hIcon[0] = AfxGetApp()->LoadIcon(IDI_WHITE);
 hIcon[1] = AfxGetApp()->LoadIcon(IDI_BLACK);
 hIcon[2] = AfxGetApp()->LoadIcon(IDI_RED);
 hIcon[3] = AfxGetApp()->LoadIcon(IDI_BLUE);
 hIcon[4] = AfxGetApp()->LoadIcon(IDI_YELLOW);
 hIcon[5] = AfxGetApp()->LoadIcon(IDI_CYAN);
 hIcon[6] = AfxGetApp()->LoadIcon(IDI_PURPLE);
 hIcon[7] = AfxGetApp()->LoadIcon(IDI_GREEN);
 for (n = 0; n < 8; n++) {
  m_imageList.Add(hIcon[n]);
 }
原文地址:https://www.cnblogs.com/tianlangshu/p/1989486.html