0
votes

I have already completed a MFC project and now I need help in something else.

I have a help file which is in .txt format. When I click a Help button this help.txt file would be opened up for other user to view on how to use my application. This is to provide a user friendly application for everyone to use.

I need help in coding that could open up this help.txt file from the debug folder.

C:\Users\Ashton\Desktop\LHM TEST\Debug\help.txt

Any help would be much appreciated. Thank you.

1
What do you want to happen exactly when the user clicks on the help button ? Open Notepad with the help.txt file ? Why would you want to hard code the path of the help.txt file ? Maybe yolu want to open the help.txt file that is located in the same folder then your .exe file. Please be more specific. - Jabberwocky

1 Answers

0
votes

You can add a dialog to your project: CHelpDialog

Put a Label or Textbox in it. Read the help.txt file when opening the dialog and set text to Label or Textbox.

Open the help dialog like this:

CHelpDialog help;
help.DoModal();

Another easy way would be opening the help.txt file into a Wordpad or something, then get a image using screen capture and put the image in the help dialog.