L3DT documentation
Large 3D terrain generator

zfilesel_Init

Description

Initialise the contents of a file selector variable (VarID_filesel).

Files

Declaration Zeolite.h
Implementation Zeolite.cpp

Function prototype

bool zfilesel_Init(ZVAR hFileSel, bool OpenFileFlag, const char* lpFileName, const char* lpFilterStr, const char* lpDefaultExt, const char* lpDefaultDir);

Arguments

Name Type Comment
hFileSel ZVAR A ZVAR handle to a variable, which must be of type VarID_filesel.
OpenFileFlag bool A flag that determines whether the file selector dialog is an open-file type (true) or a save-file type (false).
lpFileName const char* A handle to a C-style string containing the initial filename to be displayed in the file selector dialog box. This string may be null.
lpFilterStr const char* A handle to a C-style string containing the file type filter string. For an example filter string, please see the comments section.
lpDefaultExt const char* A handle to a C-style string containing the default file extension that will be appended to the filename if the user does not provide an extension (this applies to 'save' dialogs only.) This string may be null.
lpDefaultDir const char* A handle to a C-style string containing the default directory in which the file dialog will be opened. This string may be null. If a value is provided, subsequent calls to zfilesel_GetPathA will automatically trim the default directory from the returned string, providing a relative path to the given default directory.

Return value

False if an error occurred, and true otherwise.

Comments

Example filter string

Filter strings are pipe ('|') delimited, alternating strings of the display filter and the extension. An example filter for a dialog that accepts “BMP images (bmp, dib)”, “JPG images (jpg, jpeg)” or “All files” is shown below:

"BMP images (bmp, dib)|*.bmp;*.dib|JPEG images (jpg, jpeg)|*.jpg;*.jpeg|All files|*.*|"
 
zeolite/functions/zfilesel_init.txt · Last modified: 2017/08/31 07:08 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki