We have concluded the discussion of creating a custom control. Looking back at our 'scope' we have touched all the areas that we intended to. Although we only used only a dozen or so GDI+ functions out of the 600+ available, we did cover how to set up in order to be able to use them. And we stressed the necessity of cleanup to prevent crashes.
Where do we go from here? For those adventurous enough there are many ways the functionality of this control can be increased. The reader could modify the code to give the user control over the colors for the frame, background, tic marks, numbers, and pointers. Alarm points for high/low indications could be added and have the gage flash an alarm color as well as send a message to the parent so that action can be taken in the user's program. The user could be allowed to change the font parameters. Two different fonts could be used; one for dial numbers and one for text labels.
I would suggest that the reader pick at least one (or more) of the above suggestions from above and attempt to implement it. This would reinforce the learning process to ensure the reader understands the principles that have been discussed. And it may prompt clarification questions.
I hope at least a few will have found this tutorial useful and will be encouraged to attempt their own custom control.
Before closing I wish to express my appreciation to Sapero for all his help. The optimization techniques employed in this control were all his ideas, not mine. And I must admit I bugged him numerous times when I ran into stumbling blocks.
I would also like to mention forum member Jose Roca. It was his GDI+ postings on his web site that really enabled me to use that library. If I had only the Windows SDK to go by there would have been no GDI+ used.