Windows GDI programming exercises

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm reading "Programming Windows", 5th Edition, by Charles Petzold. This is
a great book which has plenty of good examples, but no exercises/assignments
for the user to code. Are there any books, web sites, class notes, whatever,
for Windows exercises that you could suggest? (When searching online, I've
seen books that discuss kernel programming that have exercises but that's not
what I want right now.) Thanks.

Scott
 
By the way, I forgot to mention that I'm interested in C or C++ programming.
 
scottb2 said:
I'm reading "Programming Windows", 5th Edition, by Charles Petzold. This
is
a great book which has plenty of good examples, but no
exercises/assignments
for the user to code. Are there any books, web sites, class notes,
whatever,
for Windows exercises that you could suggest? (When searching online,
I've
seen books that discuss kernel programming that have exercises but that's
not
what I want right now.) Thanks.

I don't know about any sites, but I'll be happy to offer the first
introctory exercise. Write a program that displays thumbnail images just
like the Windows Explorer Thumbnail View.

1. Use any images, three or more.
2. If the images do not already have thumbnails, create them.
3. Persist image proportions in the thumbnails (no stretching).
4. Thumbnail images must be centered.

I'm sort of working on the same task and have one through three accomplished
so far. I have cropped screenshots of my progress. The first shot is my
progress after completing steps one and two. Compare my thumbnails (bottom)
to the Windows thumbnails (top):

http://home.san.rr.com/vagabondia/images/tmp/sample.gif

After getting the size and the aspect ratio correct in step three, things
are looking much better in the next comparison:

http://home.san.rr.com/vagabondia/images/tmp/sample_v2.gif

I hope this is something along the lines of what you wanted.

Regards,

Carl
 
Thanks for the posting suggestion. I've tried several places and this is the
first place that has replied at all. I appreciate it.

I do usually try to code projects of my own. This is usually after getting
a good feel for nifty things that can be done. Yes, I see thousands of
applications, but nothing toned down in the scope of an exercise. I've also
been really stressed for my day job (ia64 assembler coding) and its sort of
hard to switch gears for a personal project. That's what coding exercises
are good for...a starting point.

Scott
 
That's an excellent suggestion. Perhaps you can email me privately and
discuss techniques for converting an image into a thumbnail. You've got me
curious.

I hope that other suggestions will keep coming. Thanks.

Scott
 
scottb2 said:
That's an excellent suggestion. Perhaps you can email me privately and
discuss techniques for converting an image into a thumbnail. You've got
me
curious.

I hope that other suggestions will keep coming. Thanks.

I don't have your private email address. Feel free to send it to VagabondSW
at gmail dot com if you wish.

I use C# and Visual Basic and the .NET Framework classes. So, I used the
GetThumbnailImage method of the System.Drawing.Image class. There are a
couple of ways to do it with C++. You could use the ATL CImage class or you
could also use the System.Drawing.Image class as explained in this article:

http://www.developer.com/net/cplus/article.php/1562671

Keep in touch!

carl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top