Home arrow C++ arrow Page 7 - Using MFC in C++ Part 4: Controls, DDX and DDV
C++

Using MFC in C++ Part 4: Controls, DDX and DDV


In this article, Mitchell will describe how to add several controls to your dialog windows, including the edit box, group box, check box, list box and radio button. He will also describe what DDX and DDV functions are, and show you how to use them to automatically get and set the values of the controls on a dialog.

Author Info:
By: Mitchell Harper
Rating: 4 stars4 stars4 stars4 stars4 stars / 61
December 17, 2001
TABLE OF CONTENTS:
  1. · Using MFC in C++ Part 4: Controls, DDX and DDV
  2. · Controls explained
  3. · The push button control
  4. · The check box control
  5. · The radio button control
  6. · The list box control
  7. · The group box control
  8. · DDX and DDV explained
  9. · Conclusion

print this article
SEARCH DEVARTICLES

Using MFC in C++ Part 4: Controls, DDX and DDV - The group box control
(Page 7 of 9 )

The last control we will look at in this article is the GROUPBOX control. To Visual Basic developers, this is exactly the same as the frame control. A group box looks like a border, and should be used to separate your programs windows into logical areas. A GROUPBOX control looks like this:

A sample group box control

We add a group box to our resource file with the following syntax:

GROUPBOX [Caption], [Control Id], [X Pos], [Y Pos], [Width], [Height], [Style Options]

The group box shown in the example image above is declared like this:

GROUPBOX "Test Group Box", IDGB_TEST, 5, 5, 290, 190, WS_VISIBLE

Group boxes not only separate your dialog boxes into logical sections, but they also enhance the look of your dialogs as well.

Now that we have a good grasp on some of the most popular MFC controls, I will now describe a much easier way to get and set the values of these controls.
blog comments powered by Disqus
C++ ARTICLES

- Intel Threading Building Blocks
- Threading Building Blocks with C++
- Video Memory Programming in Text Mode
- More Tricks to Gain Speed in Programming Con...
- Easy and Efficient Programming for Contests
- Preparing For Programming Contests
- Programming Contests: Why Bother?
- Polymorphism in C++
- Overview of Virtual Functions
- Inheritance in C++
- Extending the Basic Streams in C++
- Using Stringstreams in C++
- Custom Stream Manipulation in C++
- General Stream Manipulation in C++
- Serialize Your Class into Streams in C++

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials