iCAx开思工具箱

标题: 设置对话框初始路径为“我的电脑” [打印本页]

作者: tfangxin    时间: 2009-5-14 22:09
标题: 设置对话框初始路径为“我的电脑”
使用UF_UI_create_filebox调出文件对话框 想把初始路径设置为 我的电脑
应该怎么操作 有没有人指点一下~~
作者: cam-yp    时间: 2009-5-16 08:46
Global DataUF_UI_create_filebox
Create an File Selection Box dialog.


See Also






extern int UF_UI_create_filebox (
char * prompt_string,
char * title_string,
char * filter_string,
char * default_name,
char * filename,
int * response );

char * prompt_stringInputText for standard prompt.
char * title_stringInputThe dialog title.
char * filter_stringInput/OutputThe initial value of filter_string is used to initialize
the Filter list and text field. If it contains only the
pattern and not the path, then "/current_dir/pattern"
is used for the filter. If it contains only the path
and not the pattern, then "\path\*" is used for the
filter. If the path doesn't exist,"\current_dir\*" is
used for the filter. On Unix when OK is selected from the
FSB dialog, the filter_string is the complete path+pattern
of the filter.

On NT, the FSB dialog doesn't have a filter edit box.
Therefore, when OK is selected, the returned filter_string
is always set to the folder + '*' + extension of the selected
file.

The user must allocate a buffer big enough to hold the
maximum possible file filter_string, which is
UF_CFI_MAX_PATH_NAME_SIZE bytes.
char * default_nameInputThe default name is used to initialize the Selection
text field. If it's an empty string or NULL string, the
Selection text field is set to the current directory.
char * filenameOutputWhen OK is selected from the FSB dialog, filename
is whatever was typed into the Selection field.
Usually, it is a complete path+name if the string is
automatically set by clicking on one of the files in
the filter list.

Note: An error message displays if no filename is
entered; even if there is a directory path in the
selection field.

It is caller's responsibility to allocate enough
memory for the filename string.
int * responseOutputUF_UI_OK: OK was selected
UF_UI_CANCEL: CANCEL was selected
Environment
Internal
作者: tfangxin    时间: 2009-5-21 10:55
多谢版主! 只是如何将路径设置成“我的电脑”,想打开这一类的虚拟文件夹,为不是某个具体磁盘路径




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3