Question: Using Microsoft Visual Studio you will create a Visual C++ desktop project that will read the contents of a data file, convert the data using

Using Microsoft Visual Studio you will create a Visual C++ desktop project that will read the contents of a data file, convert the data using a class definition, and insert the results into a listbox.

Set the window size, color, and add controls to match the following layout.

Set the window background to grey and size to 200, by 300.

Use the following file for data input:

DATA.txt

(A - Alpha B - Bravo C - Charlie D - Delta E - Echo F - Foxtrot G - Golf H - Hotel I - India J - Juliet K - Kilo L - Lima M - Mike N - November O - Oscar P - Papa Q - Quebec R - Romeo S - Sierra T - Tango U - Uniform V - Victor W - Whiskey X - Xray Y - Yankee Z - Zulu 0 - Zero 1 - Wun 2 - Too 3 - Tree 4 - Fower 5 - Fife 6 - Six 7 - Seven 8 - Ait 9 - Niner)

2. Class definition

Create a class definition and name it:

ConvertText

Insert the correct project documentation at the top of the source code files and the appropriate code comments in your source code.

Be sure to insert the class header include to the project header and swap the includes in the implementation file.

3. Add a method to the class definition

Create a public method and call it:

Convert

Convert should accept a string object and return a TCHAR array.

4. Capture the button click

Capture the button click event in the main module.

Instantiate (create an object from) the class.

Within the button capture block in the WndProc() function, perform the following steps:

  1. Insure that the listbox is empty.

  2. Read the data file into a locally defined array.

  3. After closing the file convert each element of the array using the class method created in step 3.

  4. Add each converted text element to the listbox.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!