Microsoft Visual C++ 6.0: By: Shahed Shahir Email: Shahir@uwindsor - Ca Office Hour: Mondays 9:00am-11:00am
Microsoft Visual C++ 6.0: By: Shahed Shahir Email: Shahir@uwindsor - Ca Office Hour: Mondays 9:00am-11:00am
To
Microsoft Visual
C++ 6.0
By: Shahed Shahir
Email: [email protected]
Office hour: Mondays 9:00am-11:00am 1
Requirements
• Object Oriented Programming
• C++ programming
2
Introduction
Advantage:
Microsoft Visual C++ is a powerful tool. Visual
C++ is inherited window’s functionality. In fact,
developers can manipulate hardware and
software at the same time; however, no other
programming platforms can provide such a
powerful tool for users in a windows operating
system.
Microsoft Visual C++ includes Comprehensive
debug tools.
3
Introduction
Disadvantage:
In order to monopolize computer software market, Microsoft does not
reveal the key functions to public.
Reference
Microsoft Developer Network
http://msdn.microsoft.com/
Online Help
US$3000.00 for helping in a single project
US$240.00 for a single solution
4
Outline
I. Console Application
II. Dialog Based Application
5
I. Console Application
• Start new project
6
1. Choose the project type as a Win32 console
Application.
2. Type the project name as you wish.
7
8
9
10
EXAMPLE ONE
11
II. Dialog Based Application
12
Start new project
13
Microsoft Fundation Class Project
•Choose Application Wizard for MFC
•Type the desire project name
14
15
CObject
CCmdTarget
CWnd
CDialog
16
• CObject is the principal base class for the MFC.
• CCmdTarget is the base class for all the application
architecture classes in MFC. All classes that handle
messages are derived, directly or indirectly, from this class.
• The CWnd class provides the base functionality of all
window classes in MFC for Window programming.
• The CDialog class is the base class used for displaying
dialog boxes on the screen. (modal and modeless)
17
18
19
20
Functions
1. Switch
2. UpdateData
3. UpdateWindow
21
1. Switch
– switch( expression )
{
[case constant-expression:]
...
[statement]
...
[default:
statement]
}
22
2. UpdateData
• Syntax:
23
3. UpdateWindow
• syntax:
• void UpdateWindow( );
24
EXAMPLE TWO
25