Click here to Skip to main content
15,897,360 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Rage18-Jun-07 23:42
professionalRage18-Jun-07 23:42 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo18-Jun-07 23:49
Chen-XuNuo18-Jun-07 23:49 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Rage19-Jun-07 0:22
professionalRage19-Jun-07 0:22 
QuestionRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Hamid_RT19-Jun-07 0:47
Hamid_RT19-Jun-07 0:47 
AnswerRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo19-Jun-07 6:29
Chen-XuNuo19-Jun-07 6:29 
AnswerRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine19-Jun-07 4:48
James R. Twine19-Jun-07 4:48 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo19-Jun-07 6:27
Chen-XuNuo19-Jun-07 6:27 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine19-Jun-07 6:56
James R. Twine19-Jun-07 6:56 
   You can use some software, like MSPaint, or the GIMP[^], to scale the images outside of the application.  If you need to scale it internally, you can use GDI/GDI+ to draw the bitmap scaled directly into the appropriate area of the Imagelist control.

   This is a bit tricky if you have a large number of images.  Basically, you preallocate the space for the images in the Imagelist control using the ImageList_SetImageCount(...) macro, extract IMAGEINFO structures for each image "space" using the ImageList_GetImageInfo(...) macro, and then drawing the scaled-down image directly into the IMAGEINFO::hbmImage bitmap area.

   Got all that?   :P

   Also, the "mask" is a color (or an area of the image) that is considered transparent when the image is drawn.  In other words, the "mask" color (or area) is not drawn when the image is drawn onto the control.

   Peace!

-=- James
Please rate this message - let me know if I helped or not!<HR>If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles

GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo19-Jun-07 22:41
Chen-XuNuo19-Jun-07 22:41 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine20-Jun-07 0:04
James R. Twine20-Jun-07 0:04 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo20-Jun-07 3:01
Chen-XuNuo20-Jun-07 3:01 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo20-Jun-07 3:16
Chen-XuNuo20-Jun-07 3:16 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo20-Jun-07 3:25
Chen-XuNuo20-Jun-07 3:25 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine20-Jun-07 4:55
James R. Twine20-Jun-07 4:55 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo20-Jun-07 21:02
Chen-XuNuo20-Jun-07 21:02 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine21-Jun-07 1:45
James R. Twine21-Jun-07 1:45 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Chen-XuNuo21-Jun-07 16:37
Chen-XuNuo21-Jun-07 16:37 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Mark Salsbery19-Jun-07 6:50
Mark Salsbery19-Jun-07 6:50 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
James R. Twine19-Jun-07 7:01
James R. Twine19-Jun-07 7:01 
GeneralRe: Why can't it show a whole bitmap in listctrl in icon form Pin
Mark Salsbery19-Jun-07 7:56
Mark Salsbery19-Jun-07 7:56 
QuestionZoom in PRSDK (Canon SDSK supporting Power shot A640) Pin
Johnbrithol18-Jun-07 23:15
Johnbrithol18-Jun-07 23:15 
QuestionHow to resize CEdit dynamically? Pin
Soleil couchant18-Jun-07 23:06
Soleil couchant18-Jun-07 23:06 
AnswerRe: How to resize CEdit dynamically? Pin
Rage18-Jun-07 23:29
professionalRage18-Jun-07 23:29 
AnswerRe: How to resize CEdit dynamically? Pin
David Crow19-Jun-07 2:53
David Crow19-Jun-07 2:53 
AnswerRe: How to resize CEdit dynamically? Pin
bob1697219-Jun-07 4:46
bob1697219-Jun-07 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.