Index: S.No Date Experiments Name NO Staff Signature
Index: S.No Date Experiments Name NO Staff Signature
Index: S.No Date Experiments Name NO Staff Signature
S.NO
DATE
EXPERIMENTS NAME
SDI APPLICATION
MDI APPLICATION
MODAL DIALOG
PAGE
NO
STAFF
SIGNATURE
MODELESS DIALOG
READING AND WRITING
DOCUMENTS
10
11
12
13
14
15
16
ACTIVEX CONTROL
EX.NO:
AIM:
PROCEDURE:
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
EX.NO:
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:
AIM:
EX.NO:
PROCEDURE:
Step 1:
Step 2:
Choose the A typical window application from the list of application. Click finish.
22
EX.NO:
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
AIM:
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
EX.NO:
6 .MDI APPLICATION
AIM:
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();
}
43
EX.NO:
7.MODAL DIALOG
AIM:
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
EX.NO:
8.MODELESS DIALOG
AIM:
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
EX.NO:
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
EX.NO:
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
AIM:
EX.NO:
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
EX.NO:
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
EX.NO:
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:
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
AIM:
EX.NO:
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
EX.NO:
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
EX.NO:
16.ACTIVEX CONTROL
AIM:
PROCEDURE:
Step 1:
103