10.9.2 Adding a SaveAs Dialog Box

The EditFile application requires a dialog box to support the Save As command. The SaveAs dialog box prompts for a filename and enables the user to type 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