guides:programming:programmers_reference_manual:choosefile_service

CHOOSEFILE Service

Calls the common Windows File dialog box, either in Open or Save As mode.

ParameterDescription
<object>Owner window
<value>@FM-delimited array:
ValueDescription
<1><mode>

0 = Open dialog

1 = Save As dialog
<2>Filter buffer
<3>Filter index
<4>Init name
<5>Flags. Consult MSDN for a possible flag values.
<6>Initial Directory
returnvalueFull path of selected file (null if operation was canceled).


Only the first field (<mode>) is required.|

/* This code returns as output the variable File which has the new name selected. The selection types for this example dialog are bitmaps and all files. For each file type, supply the description followed by "/" followed by the file filter followed by "/".   */

CFOpt = ""

CFOpt<1> = 0    ;* open dialog

CFOpt<2> = "Bitmaps (*.bmp)/*.bmp/All Files (*.*)/*.*/"

CFOpt<3> = 1    ;* default type is the first one (bitmaps)

CFOpt<4> = "oilogon.bmp"    ;* default filename

CFOpt<5> = 0x200 ; * OFN_ALLOWMULTISELECT from the Microsoft SDK

CFOpt<6> = drive() : "\BMPS\" ; * initial directry

File = Utility("CHOOSEFILE", @window, CFOpt)
Call msg(@window, "You selected the file " : File)

For more information about Flags, refer to the Microsoft Windows SDK.

  • guides/programming/programmers_reference_manual/choosefile_service.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1