Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Creating a Thumbnail View in GUI

Posted on 1998-02-17
3
Medium Priority
?
186 Views
Last Modified: 2010-04-10
I having a problem to create thumbnail views of the images open in the GUI. In my GUI, the thumbnail view is a small version of the image opened. When it is clicked, it will display the actual image. May I ask how can go about creating thumbnails. I currently using visual C++ to code my GUI.
0
Comment
Question by:Yinteo
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 200 total points
ID: 1182455
Answer coming.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1182456
There's a lot of different steps to this and I'm not exactly sure It you are asking about a particular procedure or the whole thing.  So let me outline the whole proceddure and then if there are areas you need more details let me know.

First you will need to create the image to be shrunken.  You will need the whole image, so if only a portion is vissible on the screen (and scrolls) you will have to create the image in a memory device context.  We will call this the source device context.

Then you will create a bitmap in memory the size of the thumbnail and compatible with the source device context.  You will create a memory device context compatible with the source device context and select the bitmap in.  Let's call this the destination device context.

Then you copy and shrink the image from the source to the destination device contexts using StretchBlt().

Then you save the destination bitmap as your thumb nail.  You probably want to convert it to a device independant bitmap and save that.

That's the general idea.  Questions anyone?
0
 

Expert Comment

by:kraphics
ID: 1182457
This sounds neet, and compact, but can you post code to do exactly what you outlined ?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question