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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Buffered drawing for flicker free animation, etc. 1

Status
Not open for further replies.

qednick

Programmer
Jul 26, 2002
516
US
CGWorld CLASS LIBRARY
I created this class library to make it very easy to draw to a view/window/dialog without causing flicker. Particularly useful for animations or when you are drawing a lot of stuff in one go.
The class is very easy to use and typically, flicker can be eliminated using three lines of code. The class automatically destroys itself when it goes out of scope to avoid any memory leaks, etc.

You can use this library freely in your projects provided you credit us in your About Box. The files along with full instructions/description (in WordPad format) are stored in a single zip file archive which can be downloaded from:


New programmers will find this class particularly useful to avoid flicker in their programs.


SEARCH KEYWORDS:
flicker free animation buffered drawing off screen graphics world BitBlt copy bits bitmap CDC CDC* OnDraw OnPaint view window dialog
 
I'm relatively new to this forum and appreciate all of the great posts, but I'm reluctant to use code that doesn't have the source available. Also, unless it's a temporary error, qed-online.com's entry portal throws an error on every link.

Excuse my apprehension.

Darrell 'We all must do the hard bits so when we get bit we know where to bite' :)
 
"I'm relatively new to this forum and appreciate all of the great posts, but I'm reluctant to use code that doesn't have the source available."

I understand where you're coming from but the whole point of OOP is to allow users to 'slot in' the classes they need to get things working faster with re-usable code. I wonder how many VC++ users are 'apprehensive' about using VC++ without first examining every line of Microsoft's code?
I'm not trying to force people to use my code - I'm just trying to make new programmer's lives easier. If they don't want to use it then that's just fine.

qed-online.com's entry portal throws an error on every link.

You need to examine your link settings.


A NOTE ABOUT USING LIBRARIES:
I have been using other people's libraries for several years on both the PC and Macintosh. I appreciate the fact that it saves me a whole load of time instead of tearing my hair out trying to overcome complex programming problems. Many libraries are available both freely and commercially by many different companies and individuals the world over. These exist not only to accomplish common simple tasks but other tasks such as file compression, file conversion, etc. etc. I think everyone would agree that if we didn't have these libraries available, our programming lives would be much harder.
As for my libraries, a debug version is always available. You can single step through to examine the code. Any suggestions for improvements from any TekTips members would certainly not be ignored!! That's the whole idea of these forums - everyone helps each other. If I can make just one single programmer's life easier by posting replies or code or libraries then I feel I have achieved something.
Now I don't know about anyone else but... I would love to see more programmer's posting useful libraries on these forums. Only the other day I was looking for a library that converted BMP files to GIF files!!
 
Certainly made my life easier!!! I'm a new VC++ user and was wondering about buffered drawing in VC++. I downloaded qednick's library and gave it a shot.
The library is simple to install and use and works great. Not only that but anything that makes my project code look neater (and easier to read) is always welcome.

To continue the discussion here: I have downloaded and used free 'source code' from other places. The difference between using the source and a library is obvious. When working with other people's source (often badly commented) I still find myself tearing my hair out to some extent trying to configure things and get them to work in my environment. (I am also usually guilty of changing things here and there too - to my detriment!). On the other hand, a library can simply be 'plugged-in' to my project - no messing and no fuss. The thing works from the start which is EXACTLY what I want. It's like buying a new car - who would want to start taking it to bits, examining the wiring, etc. - IF IT WORKS, DON'T TRY TO FIX IT!!
My hat goes off to you qednick - you devoted your time (and your library) to the members of this forum AND - you certainly made MY life easier and my project looks far more professional as a result.

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top