Windows provides several built-in dialog boxes called Common Dialog Boxes that perform useful functions.
The color dialog box allows selection of colors. The result is a list of the RGB values for 17 colors, of which the first is chosen in the standard color dialog box, and the rest in the custom color dialog box. Try:
_3[\ ". wd 'mbcolor'
This returns a matrix of the 17 values, one row per color.
The font dialog box allows selection of a logical font. The result describes the font chosen (in this case the font used in the J logo):
wd 'mbfont' "Bookman Old Style" 24
The message box dialog box displays a message and waits for a user response. For example:
wd 'mb title text' wd 'mb title text mb_iconstop mb_retrycancel'
To list all message box styles:
list wd 'qs mb' mb_abortretryignore mb_defbutton2 mb_defbutton3 mb_iconasterisk mb_iconexclamation mb_iconhand mb_iconinformation mb_iconquestion mb_iconstop mb_ok mb_okcancel mb_retrycancel mb_yesno mb_yesnocancel
The open filename dialog box allows the user to select a fully qualified file name:
wd 'mbopen' wd 'mbopen title "" "" Write(*.wri)|*.wri| Word(*.doc) |*.doc" ofn_filemustexist'
To list all open filename styles:
list wd 'qs mbopen' ofn_createprompt ofn_filemustexist... ofn_overwriteprompt ofn_pathmustexist
The save filename dialog box is similar to the open filename dialog box:
wd 'mbsave'