View Full Version : How do I display thumbnails?
Joe Selander
8-Dec-2012, 05:55 PM
I want to display thumbnails of a directory and allow the user to double-click to bring up the image, like in the Image Gallery example. But I don't want the tree view. I have created a program using the cImageGallery and I have loaded all the structs and arrays, but I can't get it to display the thumbnails. How do I do this?
Joe Selander
Vincent Oorsprong
9-Dec-2012, 04:57 AM
Joe,
What do you really mean by thumbnails? Is it the information from thumbs.db?
The GDI+ feature to show thumbnails (http://msdn.microsoft.com/en-us/library/windows/desktop/ms535394(v=vs.85).aspx) retrieves - if available - a thumbnail image from the source image. If the source image does not have a thumbnail stored inside the function creates one. AFAIK it does not access the thumbs.db file.
Todd Forsberg
10-Dec-2012, 11:49 AM
The link you provided seems to be invalid.
Vincent Oorsprong
10-Dec-2012, 01:15 PM
Todd,
Thanks, somehow the closing parentheses got part of the URL...
Joe Selander
10-Dec-2012, 07:48 PM
I was finally able to do what I was trying to do. I started over using the demo Image Gallery, and one by one deleted things I didn't want, like the treeview and splitter. I had to keep the CJCommandBar. Now I have a dialog that I can pop up and see thumbnails of images in a selected directory, and then double-click any image to see the larger image. Really neat!
Joe
Ditte
19-Jan-2015, 06:24 AM
It is a nice sample for using the image library.
Is there a way to show a thumbnail for a not support format. At sample. In my directories are some pdf files. I can not open it with the image package. But I would display a thumbnail named "Acrobat" or "PDF" without image. At click on it I could display it with a pdf viewer.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.