Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing Pictures

Status
Not open for further replies.

alehawk

Programmer
Jun 18, 2003
332
AR
Hi!
I am makin an app to show my pictures but how can I display all pics like in thumbnails, one next to the other?
Tnx!
 
There are probably lots of ways to do this, but two ways come to mind.

One is to make a custom window class that will take the bitmaps of the picures you want to display, and use StretchBlt to paint reduced sizes of them in its window. Using StretchBlt you can specify the size to make the picture, and the function will automatically shrink the picture to that size, and you can specify where in the window to paint them.

Another way is to derive a new class based on CListCtrl. Then shrink the pictures in memory, using StretchBlt but to a bitmap in a memory DC (one pair for each picture) instead of the window. Add them to a CListImage object to make a list. Then use the shrunken bitmaps for the image list of the control (SetImageList). Then add items to the control, one for each image. Put the control in icon view mode.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top