Solved

Creating a Thumbnail View in GUI

Posted on 1998-02-17
3
177 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 100 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now