You need a new dialog box to support the Save As command. The Save As dialog box prompts for a filename, and lets the user enter the name in an edit control. Add the following DIALOG statement to the resource file:
SaveAs DIALOG 10, 10, 180, 53
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION “Save As”
BEGIN
LTEXT “Save As File &Name:”, IDC_FILENAME, 4, 4, 72, 10
LTEXT “”, IDC_PATH, 84, 4, 92, 10
EDITTEXT IDC_EDIT, 4, 16, 100, 12
DEFPUSHBUTTON “Save”, IDOK, 120, 16, 50, 14
PUSHBUTTON “Cancel”, IDCANCEL, 120, 36, 50, 14
END
The constants IDC_PATH, IDC_FILENAME, IDC_EDIT, IDCANCEL, and IDOK are the same as those used in the Open dialog box. Since the Open and Save As dialog boxes will never be open at the same time, there is no need to worry about conflicting control IDs.