FunctionX Press FunctionX C++ Managed C++ Visual C++ .NET C++ Builder Win32 C# Visual C# #develop
Microsoft Foundation Class Library    
    MFC Fundamentals
Introduction to Applications
Messages and Events
Frames Fundamentals
Windows Resources
Characteristics of Windows Frames
Fundamentals of Windows Controls
Forms
Control Design
 
    Windows Controls
 Animation
 Bitmap Button
 Button
 Check Box
 Combo Box
 Date Picker
 Dialog Bar
 Dialog Boxes
 Edit Box
 File Dialog
 Forms
 Group Box
 List Box
 List View
 Month Calendar
 Mini Frame
 Picture
 Picture Clip
 Progress Bar
 Progress Bar (ActiveX)
 Property Pages
 Radio Button
 Rich Edit 1
 Slider
 Scroll Bar
 Spin Button
 Static Control
 Static Text
 Timer
 Time Picker
 Tree Control
 UpDown
 Wizard Pages
 
    MFC Library
 CMetaFileDC
 
 
     General Articles
About this site
Visual C++ Spoiled in .NET
Inline Assembly: Add 2 Values
     Controls-Related Articles
These are topics of ways of using Windows controls but that don't fit in the How-To section
Message Boxes Currency In Dialog
Menu Issues Command Line
List View In SDI 2 Tree View In SDI
Tree View In Dialog GDI Coordinate Systems
MS Access Table Wizard Simulation
     MFC Classes
Techniques of using the classes of the MFC library.
RichEdit Slider
Spin Control Rich Edit
List Box Rich Text

 

     How To (MFC)
How to talk on the phone while you are driving? Don't do it. If you want to make a phone call that cannot wait, please stop the car and park on the site. Then call whoever you need to. It is better to waste a few minutes safely than to jeopardize yours and other people's lives for a lifetime!!! These are tips and tricks you can apply to MFC controls to get a certain behavior
Create a Simple Window
Create a Popup Window
Call A Dlg From An SDI/MDI
Call A Dialog From A Dialog
Create a Floating Window
Create a Mini Frame-Based Application
Remove an Occurrence in a String
Implement Radio Buttons
Create a Property Sheet-Based Application
Implement Property Sheet Buttons
Implement Wizard Buttons
Create a List View In a Dialog
Create a List View In an SDI 1
Display Bitmaps on a Dialog Box
Display a Bitmap
Transfer data from one dialog box to another
Launch an Application
Display a Context Menu on a Control
Create a border-less, title bar-less, maximized dialog box
Change a Cursor in a Dialog Box
Change the Icon of a Dialog Box
Store Values in the Registry
 
 
Google
 
Web www.functionx.com

 

 

 

 

 

Libraries

GDI Shapes

GDI Accessories

File Processing

Collections

Introduction Introduction Introduction Colors Archiving An Array of Objects
Static Libraries With MFC Static Libraries With MFC Lines Fonts Using the Common Dialogs A List of Strings Class
Win32 Static Libraries MFC Static Libraries Polylines Pens Using CDocument A List of Objects Class
Win32 Static DLL Win32 Static DLL Polygons Brushes C++ Serialization Using a SQL Server Table
Win32 DLL Win32 DLL Rectangles Bitmaps
Module Definition File Module-Definition File Circles The GDI Coordinate System
DLL Explicit Call DLL Explicit Call Curves
Drawing Text
 

Applications

Man It is hardly disputed that experience in computer programming comes from writing various programs. The goal of this section (including this site and our ebook) is to provide as various examples as possible. This section contains small applications that illustrate how to combine various MFC controls to implement a particular functionality
This section gives examples of using various Windows control with each application illustrating one particular control.
Notes
This example shows a technique of changing the font of a CEditView-based application instead of using the default.
Color Changer
This example demonstrates a simplistic way to use the scroll events of a dialog box. It uses three track bars to change or update the background color of a static control.
Net Price Calculation
This is a good example of edit box 101 showing how to display numbers in edit boxes.
Tick Counter
This is a technique of calling the Win32's GetTickCount() function to find out how long a computer and/or an application has (have) been on.
Time Sheet: One Shift (Combo Boxes)
This is one-shift time sheet that uses combo boxes instead of edit boxes. The idea is to reduce the likelihood of some mistakes, such as specifying a starting time that occurs after the end time.
Time Sheet: One Shift (Time Picker)
This time sheet also allows the user to select time instead of typing it. This one uses the Time Picker control.
Displaying Bitmaps
This is demonstration of how to display and change the pictures in a control positioned on a dialog box. In this case the pictures display on a static control and the picture changes if the user selects a certain value in a combo box.
Body Monitor
This is another combination of timer and progress bar. This example demonstrates the use of various independent timers in the same dialog box. Each timer gets a random value and uses it to update the value of its corresponding progress bar.
Column Chart
This example uses some values of controls that are positioned on a dialog bar. The values are then used to draw a type of column chart.
Deskpad (Revised)
This is a type of introduction to the CRichEditView and its CRichEditCtrl control.
This section is made of applications that each uses various controls.
Wake Me Up
This application uses MCI to simulate a clock radio but it is used to play a CD when the set time occurs.
College Park Auto-Shop
This is a Microsoft SQL Server Desktop Database (MSDE) database used in an MFC application. The connection is done through an ODBC Data Source. To adapt it to MySQL, make sure that, all you have to do is download the MySQL ODBC Connector.
Georgetown Cleaning Services
This application applies the DatePicker, the TimePicker and the combo box controls to simulate a dry cleaning business.
Payroll
This application is primarily used to take advantage of the date picker control. Meanwhile, it is used to simulate the calculation of overtime from a time sheet.
Clarksville Ice Cream
This application reviews the features of a combo box by simulating an ice cream shop.
Windows Explorer
This example shows how to create a type of Windows Explorer application using a CTreeView class in a left frame and a CListView class in the right frame.
Compound Interest
This is a good example of starting with radio buttons. It calculates the amount of money paid on a loan depending on the frequency of calculation.
Car Inventory

This example demonstrates techniques of using changing pictures of a static control in response to the user using another control, in this case a track bar.

Danilo Pizza
This application retrieves the values of radio buttons, check boxes, and text boxes to perform some operations live. That is, the user doesn't have to click a Calculate, a Submit, or an Apply button: as soon as the value of a control changes, the calculation is automatically updated.
CD Publisher
This demonstrates the use of a spin button to increase or decrease the values by clicking one of the buttons of the control.
Login Dialog Box
This example uses file processing to create a dialog box that presents itself when an application starts. The user must provide a valid username and password in order to access the application.
Screen Saver Simulation
This example simply shows how to continuously draw some geometric figures on the screen in response to a timer ticking.
Pledge Distribution
This is an example of changing the range of values of spin buttons in response to some action by the user. Three spin buttons are created an synchronized while the application is running.
Progressive Clock
This example uses a timer to display the current time of the computer by updating three progress bars in a dialog box.
 

I have written an electronic book that contains some of the material on this site and more. It addresses MFC programming and Windows controls programming in a unique, detail-oriented, and friendly format. I am sure you will highly benefit from it.
You can purchase it
Other FunctionX Press books
Support Site
A separate ebook that covers Microsoft Visual C++ .NET and the .NET Framework is also available for purchase.
 
Products
Contact
Related Sites
Win32 | C++ | C# | MS SQL Server | Visual Basic .NET | SQL | MS Access | Visual Basic
Last Update:  Thursday, June 30, 2005 20:28
Copyright © 1998-2005 FunctionX, Inc.
Links
Samples/Downloads