Posted on 1997-04-30
I have a program with “FILE” on the menu bar, and under “FILE” I have the following:
The “FILENAME” is suppose to show the LAST USED FILE NAME to the menu bar.
I know that I need to use the Windows API functions for READING and WRITING an INI file to do this but I am not sure how to use the WritePrivateProfileString and ReadPrivateProfileString to Read and Write the filename to XXXXXX.ini file to accomplish this task.
At LOAD the code should read the XXXXX.ini file for the LAST USED FILE NAME and display that file name on the MENU BAR (Shown above) as “FILENAME”
At EXIT while closing out of the program, it will first write the current file name to the XXXXX.ini file.
Can someone provide code to get me going on this???