Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Как добавить больше изображений в ImageList? Как вывести их в разных местах с помощью координат или ещё чего-нибудь? Как отображать картинки большего размера(48 -- максимальный размер отображаемого изображения, большего они просто не отображаются)

Код с сайта

How to add more images in ImageList? How to display them in different places using the coordinates or something else? How to display pictures of a larger size (48 - the maximum size of the displayed image, they simply are not larger)

Code from the site

https://www.tutorialspoint.com/mfc/mfc_image_lists.htm

Даже не знаю, как у них заработал пример с изображением 800x800
I do not even know how they got an example with the image of 800x800


What I have tried:

C++
CMFCImageListDemoView::CMFCImageListDemoView(){ 
  ImageList.Create(48, 48, ILC_COLOR, 4, 1);

  CBitmap bmp;
  bmp.LoadBitmap(IDB_BITMAP1); 
  ImageList.Add(&bmp, RGB(0, 0, 0));
}
Posted
Updated 13-Dec-18 3:44am
v2
Comments
OriginalGriff 13-Dec-18 5:40am    
This is an English language site, and we only accept and answer questions in that language.
If you do not speak English, use Google Translate to convert Russian before posting.

Это сайт на английском языке, и мы принимаем и отвечаем только на вопросы на этом языке.
Если вы не говорите по-английски, используйте Google Translate для конвертации русского языка перед публикацией.

When you call the Create function, you pass the size of the images you wish to display: Microsoft Visual C++/MFC: Images Lists[^] - in your case, 48 x 48. You want bigger? Create it with bigger numbers ...
 
Share this answer
 
OriginalGriff ist right. The only work arund is to create a big enough image list.

If you need to grow it, you must fetch the images from old list and insert them in the new and bigger one.

This is typical for MFC: some stupid stuff.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900