Add New Variables

You need to declare several new global and local variables in order to hold the filename and the various pieces used to build the filename. Add the following statements at the beginning of your source file:

char FileName[128];/* current filename */

char PathName[128];/* current pathname */

char OpenName[128];/* filename to open */

char DefPath[128];/* default path for list box */

char DefSpec[13] = “*.*”;/* default search spec */

char DefExt[] = “.txt”;/* default extension */

char str[255];/* string for sprintf() calls */

You need a new local variable to hold the procedure-instance address of the FileOpen dialog box. Add the following statement at the beginning of the window function:

FARPROC lpOpenDlg;