Monday, November 2, 2009

Visual C++ 6 computer programming lesson. Building a Phone book Part - 5







* Open MS Visual C++ 6.

* To create a new project, select File > New menu item. "New" dialog box will open. Go to the "Projects" tab of this dialog box (pic 29).




* As seen in pic 29, select "MFC AppWizard (exe)" item in "Projects" window. Because we are going to create a MFC application.

* Click on the button next to "Location" text box, and select the folder with your PhoneBook access file.

* In "Project Name" text box, type "PhoneBook" as the project name.

* Now close the "New" dialog by clicking the OK button. "MFC AppWizard" dialog box will open (pic 30).



* Select the "Single Document" radio button (pic 30), to create a app with a single document (window).

* Click on "Next" button to go to the next page.




* Select the "Database view without file support" radio button.

* Now click on the "Data source" button to open the "Database option" dialog box (pic 32).


* Select the "ODBC" radio button inside the "Datasource" section. Now select "PHONEBOOK" from the list box next to it. It's the datasource you have created earlier.

* Select the "Dynaset" radio button inside the "Recordset type" section.



* Close the dialog box by clicking the OK button. The dialog box in pic 35 will open. Select "Table1" item to use the Table1 table of the access database. Click OK.

* Now click "Finish" to close the "MFC AppWizard". A dialog box will open. Click OK.

* In few seconds, your Application's dialog template will open inside VC++ (pic 36).


To be continued..

1 comment:

  1. Start by loading the Visual C++ IDE. You can also see how to do this with Visual C++ or Turbo C++ Explorer. From the File menu, click New and select Project. Select Win 32 on the Project Types tree. In the name box, enter example1. You can change the location to wherever you want to store the examples. It defaults to a folder within Documents and Settings. This folder holds the source code and project files. If you want a new directory leave the Create directory for solution checkbox ticked.

    womens health

    ReplyDelete