Microsoft Foundation Library Controls
(Page 1 of 4 )
Microsoft has always been occupied with the development of libraries that make programmers’ lives much easier inside their own operating system. The Microsoft Foundation Library is just a prime example of this. As with each library, this also needed to provide a reliable and easy way to handle the objects of the Windows OS. The solution found by the company was the creation of controls.
This is the first part of a three-part article series that will appear here on the ASP Free website of the Developer Shed Network. Throughout this article, I will present the most representative controls inside MFC in general and how to use them. In the second part, the theme will be the Virtual List, one of the many smart tricks we can use to speed up our program that uses MFC controls.
In our final article, we will see how we can implement a selection on a list control with the report style, similar to a capability within the MS Excel suite. You don't need too much knowledge beforehand to get the most out of this series, just the basics of Object Oriented Programming (in C++); you should also be able to create an MFC application with the wizard. If you lack information on how to do this, I recommend that you read my Introduction to MFC articles.
Controls are all over the place in your calculator. The "OK" button, for instance, is a control. The edit box within which you type your name, or the text that appears inside a dialog, can also be a static control, not to mention radio buttons, check boxes, and more. If you managed to start up your Visual Studio, you've already seen countless examples of this:

There are a lot more controls, objects that are implemented inside the operating system directly. The list is long and full of useful items; just look at those currently available inside Visual Studio 2008 in the Toolbar section:

As you can see, there exist controls for all kinds of objects inside the Windows operating system. With the help of the resource editor, you can add them, assign variables to them, and create an object from them, as explained here.
Next: The Control Classes >>
More BrainDump Articles
More By Gabor Bernat