Sie sind auf Seite 1von 18

INDEX

S.NO

DATE

EXPERIMENTS NAME

SIMPLE APPLICATION USING FILE SYSTEM

CREATING SIMPLE WINDOWS USING SDK

KEYBOARD AND MOUSE EVENTS USING


SDK

SIMPLE DIALOGUE BASED APPLICATION


FOR INTEREST COMPUTATION

SDI APPLICATION

MDI APPLICATION

MODAL DIALOG

CONTROL AND DATA CONTROL

PAGE
NO

STAFF

SIGNATURE

MODELESS DIALOG
READING AND WRITING
DOCUMENTS

10

DYNAMIC CONTROLS USING


SLIDER AND PROGRESS
CONTROL

11

TREE VIEW CONTROL

12

DYNAMIC SPLITTER WINDOW

13

STATIC SPLITTER WINDOW

14

DYNAMIC LINK LIBRARY

15

DATA ACCESS THROUGH ODBC

16

ACTIVEX CONTROL

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

1.SIMPLE APPLICATION USING FILE SYSTEM CONTROL AND


DATA CONTROL

AIM:

To write a visual basic program to connect database using data controls.

PROCEDURE:

Step 1: Start the program .

Step 2: To open a visual basic form .

Step 3: To design the form using toolbox controls.

CONTROLS

CAPTION

Label2

Address

Label1

Name

Label3

Phone number

Command2

Delete

Command4

Load

Command1

Add

Command3

Exit

Drive

Drive1

Dirlistbox

Dirlistbox1

Filelistbox

Filelistbox1

Image

img

Step5: To place the drivelistbox, dirlistbox and filelistbox into the frame.
Step6: To place the data control in the form from toolbox..
Step7: To create the table in ms access.

11

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

2.CREATING SIMPLE WINDOWS USING SDK


AIM:

To write a program to display a simple SDK window.

PROCEDURE:
Step 1:

Open Visual C++, select New from File menu and click the project tab. Select Win32
application and give the project name.

Step 2:

In Win32 Application, select An empty project in Step -1. click finish.


17

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

AIM:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

3.KEYBOARD AND MOUSE EVENTS USING SDK


To write the SDK type program for keyboard and mouse events.

PROCEDURE:
Step 1:

Step 2:

Run the Win32 application wizard by selecting Win32Application in New project.

Choose the A typical window application from the list of application. Click finish.

22

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

4.SIMPLE DIALOGUE BASED APPLICATION FOR INTEREST COMPUTATION


AIM:

To write a MFC application program for simple interest calculation in dialog


based application.
PROCEDURE:
Step 1:

Open Visual C++ Application. Create new project by selecting New from File menu, then
New window will appear.

Select MFC AppWizard(exe) and give the Project name as sidemo, then click ok button.
Step 2:
30

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

AIM:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

5.SDI APPLICATION
To write a MFC Application program for single document interface.

PROCEDURE:
Step 1:

Open Visual C++ Application. Create new project by selecting New from File menu, then
New window will appear. Select MFC AppWizard(exe) and give the Project name as SDI, then
click ok button.
Step 2:

In AppWizard, select Single Document and other are default. Click finish and ok button.

Step 3:

In workspace, select FileView tab. In Source File select SDIView.cpp. Place the code in
OnDraw function.
void CSDIView::OnDraw(CDC* pDC)
{

39

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

6 .MDI APPLICATION
AIM:

To write MFC Application program for multiple document interface.

PROCEDURE:
Step 1:

Open Visual C++ Application. Create new project by selecting New from File menu, then
New window will appear. Select MFC AppWizard(exe) and give the Project name as SDI, then
click ok button.
Step 2:
button.

In AppWizard, select Multiple Document and other are default. Click finish and ok

Step 3:

In workspace, select FileView tab. In Source File select SDIView.cpp. Place the code in
OnDraw function
void CMDIView::OnDraw(CDC* pDC)
{
CMDIDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CFont f;
f.CreateFont(15,15,900,0,1000,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_
DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|F
F_ROMAN,"ROMAN");
pDC->SelectObject(&f); pDC>TextOut(25,300,"MDI Rectangle");
pDC->Rectangle(100,100,200,200);
f.DeleteObject();
}

// TODO: add draw code for native data here

43

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

7.MODAL DIALOG
AIM:

To write a MFC application program for creation of modal dialog box.

PROCEDURE:
Step 1:

Open Visual C++ Application. Create new project by selecting New from File menu, then
New window will appear. Select MFC AppWizard(exe) and give the Project name as modal,
then click ok button.
Step 2:
Step 3:
option.

In AppWizard, select Single Document and other are default. Click finish and ok button.
Creating a Menu Bar using Resource View. Right click Menu, then select Insert Menu

46

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

8.MODELESS DIALOG
AIM:

To write a MFC application program for creation of modeless dialog box.

PROCEDURE:
Step 1:

Open Visual C++ Application. Create new project by selecting New from File menu, then
New window will appear. Select MFC AppWizard(exe) and give the Project name as
modelessdemo, then click ok button.
Step 2:
Step 3:

In AppWizard, select Single Document and other are default. Click finish and ok button.
Design a Dialog Box by insert Dialog from Resource View.

Step 4:

Using Class Wizard, select the option Create a new class and give the class name as
modeless.

54

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

9.READING AND WRITING DOCUMENTS


AIM:

To write the MFC Application for reading and writing into document.

PROCEDURE:
Step 1:
Step2:
Step3:

Select MFC AppWizard(exe) and give project name as document then click ok.
Select single document in MFC AppWizard in step -1. click finish and ok.

Click on the resource view tab in the workspace window. Edit IDR_MAINFRAME
menu resource.

62

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

10.DYNAMIC CONTROLS USING SLIDER AND PROGRESS CONTROL

AIM:

To write an MFC application program for Dynamic control using slider and
progress control.
PROCEDURE:
Step 1:

Open Visual C++ Application. Create new project by selecting New from File menu, then
New window will appear. Select MFC AppWizard(exe) and give the Project name as control,
then click ok button.
Step 2:
Step 3:

In AppWizard, select Dialog based and other are default. Click finish and ok
Insert the controls in the dialog box using control tools.

68

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

AIM:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

11.TREE VIEW CONTROL


To write the program for CTreeView control.

PROCEDURE:
Step 1:

Open Visual C++ Application. Create new project by selecting New from File menu, then
New window will appear. Select MFC AppWizard(exe) and give the Project name as treedemo,
then click ok button.
Step 2:

Select single document in AppWizard step 1 and in step 6 change the base class
as CTreeView. Select finish and press ok.

73

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

12.DYNAMIC SPLITTER WINDOW


AIM:

To write the MFC Application for creating dynamic splitter window.

PROCEDURE:
Step 1:

Open Visual C++ Application. Create new project by selecting New from File menu, then
New window will appear. Select MFC AppWizard(exe) and give the Project name as
dysplitterdemo, then click ok button.
Step 2:

In AppWizard, select Single Document in step 1 and step 4, click on the Advanced
button and click Use Split Windows option. Press finish.

77

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

13.STATIC SPLITTER WINDOW


AIM:

To create the static splitter window using MFC Application.

PROCEDURE:
Step 1:

Open Visual C++ Application. Create new project by selecting New from File menu, then
New window will appear. Select MFC AppWizard(exe) and give the Project name as exam, then
click ok button.
Step 2:

In AppWizard, select Single Document in step 1 and step 4, click on the Advanced
button and click Use Split Windows option. Press finish.
Step 3:

Type the following code in Mainfrm.cpp for OnCreateClient member function.

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT
/*lpcs*/, CCreateContext* pContext)
{
/*return m_wndSplitter.Create(this,
2, 2, // TODO: adjust the number of rows, columns
CSize(10, 10), // TODO: adjust the minimum pane size
pContext);*/
m_wndSplitter.CreateStatic(this,2,1);
m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CExamView),CSize(100,100),pCon
text);
m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(myview),CSize(100,100),pContext);
return TRUE;
}
Step 4:

Place the following code for OnDraw function in myview.cpp. the myview class can
be add by using class wizard.
void myview::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
81

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

AIM:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

14.DYNAMIC LINK LIBRARY


To create a dynamic link library using MFC for displaying system date and time.

PROCEDURE:
Step 1:

In file menu-> select New -> click Project tab, select MFC AppWizard(dll) then
andd project name as dllfile and press ok.

Step 2:

In MFC AppWizard Step 1, select Regular DLL using Shared MFC DLL and accept
all other default then click Finish.
85

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

15.DATA ACCESS THROUGH ODBC


AIM:

To write a program for student details using database

PROCEDURE:
Step 1:

Create the ODBC Data source for access MS Access. Start->Control panel >Administrative tools->ODBC Data Source. Data source Administrative Window will appear.

Step 2:

Click Add button for create new Data Source. Select Drive do Microsoft
Access(*.mdb) and clickFinish button.

94

PALLAVAN COLLEGE OF ENGINEERING, THIMMASAMUDRAM-631502


DATE:

DEPARTMENT OF MASTER OF COMPUTER APPLICATION

EX.NO:

16.ACTIVEX CONTROL
AIM:

To write program for creating and using ActiveX control.

PROCEDURE:
Step 1:

Open visual C++ application. Create new project, File->New->Project->MFC ActiveX


ControlWizard and give the project name as demobox. Accept default settings in AppWizard.
Step 2:

In CDemoboxCtrl class declare the variables. Workspace->CDemoboxCtrl(right click)>Add member variable.

103

Das könnte Ihnen auch gefallen