📄 cfiledialogst - .mht
字号:
CString GetFileName() const
</PRE><B>CString GetFileTitle() const</B><BR>This function returns the =
title of=20
the selected file. <PRE>// Return value:
// A CString object containing the title of the file.
//
CString GetFileTitle() const
</PRE><B>CString GetFileExt() const</B><BR>This function returns the =
extension=20
of the selected file. <PRE>// Return value:
// A CString object containing the extension of the file.
//
CString GetFileExt() const
</PRE><B>CString GetFileDir() const</B><BR>This function returns the =
directory=20
(without drive) of the selected file. <PRE>// Return value:
// A CString object containing the directory (without =
drive) of the file.
//
CString GetFileDir() const
</PRE><B>CString GetFileDrive() const</B><BR>This function returns the =
drive of=20
the selected file. <PRE>// Return value:
// A CString object containing the drive of the file.
//
CString GetFileDrive() const
</PRE><B>POSITION GetStartPosition() const</B><BR>This function returns =
the=20
position of the first element of the filename list. <PRE>// Return =
value:
// A POSITION value that can be used for iteration.
// NULL if the list is empty.
//
POSITION GetStartPosition() const
</PRE><B>CString GetNextPathName(POSITION& pos) const</B><BR>This =
function=20
returns the full path of the next selected file. <PRE>// Parameters:
// [IN] pos
// A reference to a POSITION value returned by a previous =
GetNextPathName=20
// or GetStartPosition function call.=20
// NULL if the end of the list has been reached.
//
// Return value:
// A CString object containing the full path of the file.
//
CString GetNextPathName(POSITION& pos) const
</PRE><B>BOOL GetReadOnlyPref() const</B><BR>This function returns if =
the Read=20
Only check box in the dialog box is selected. <PRE>// Return value:
// Non-zero if the Read Only check box in the dialog box =
is selected; otherwise 0.
//
BOOL GetReadOnlyPref() const
</PRE><B>int SelectFolder(LPCTSTR lpszTitle =3D NULL, LPCTSTR =
lpszStartPath =3D=20
NULL, UINT ulFlags =3D BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS, =
CWnd*=20
pParentWnd =3D NULL)</B><BR>This function lets the user to select a =
folder. <PRE>// Parameters:
// [IN] lpszTitle
// Address of a null-terminated string that is displayed =
above the=20
// tree view control in the dialog box. This string can =
be used to=20
// specify instructions to the user. Can be NULL.
// [IN] lpszStartPath
// Address of a null-terminated string containing the =
initial folder
// to open. Can be NULL.
// [IN] ulFlags
// Flags specifying the options for the dialog box.
// [IN] pParentWnd
// Pointer to the owner window for the dialog box. Can be =
NULL.
//
// Return value:
// IDOK
// The user has selected a folder and pressed OK. A call
// to GetSelectedFolder() will return the selected =
folder.
// IDCANCEL
// The user has closed the dialog without selecting any =
folder.
//
int SelectFolder(LPCTSTR lpszTitle, LPCTSTR lpszStartPath, UINT ulFlags, =
CWnd* pParentWnd)
</PRE><B>CString GetSelectedFolder() const</B><BR>This function returns =
the=20
folder selected by the user with a call to SelectFolder. <PRE>// Return =
value:
// A CString object containing the selected folder.
// Without a previous call to SelectFolder this string =
can be empty or
// reflect the last selected folder.
//
CString GetSelectedFolder() const
</PRE>
<H2>Example</H2>
<P>The <CODE>CFileDialogST</CODE> demo application shows how to open =
files (even=20
with multiple-selection), to ask for a filename to save and how to =
browse for a=20
folder. </P>
<H2>History</H2>
<UL>
<LI>v1.4 (31/May/2004)<BR>Encapsulated into the <B>SoftechSoftware =
DLL</B>=20
<LI>v1.3 (07/November/2002)<BR>Made compatible with Visual C++ 7.0=20
<LI>v1.2 (12/November/2001)<BR>Added <B>GetReadOnlyPref</B> =
method<BR>Added an=20
<B>#include</B> statement in CFileDialogST.h=20
<LI>v1.1 (14/September/2001)<BR>Fixed a bug in CFileDialogST(BOOL=20
bOpenFileDialog, ...)=20
<LI>v1.0 (23/June/2001)<BR>First release </LI></UL>
<H2>Want to include CFileDialogST in a DLL ?</H2>
<P><CODE>CFileDialogST</CODE> is ready to be used from inside a DLL. You =
need to=20
export from your DLL <CODE>CFileDialogST</CODE>. Include in your DLL's =
project=20
the following files:=20
<UL>
<LI>FileDialogST.h=20
<LI>FileDialogST.cpp </LI></UL>Add to your DLL's project settings the =
following=20
defines:=20
<UL>
<LI>_CMLHTDLL_NOLIB_=20
<LI>_CMLHTDLL_BUILDDLL_ </LI></UL>From <CODE>FileDialogST.h</CODE> =
comment the=20
following line: <PRE>#define _FILEDIALOGST_NODLL_
</PRE>then update the various <CODE>#pragma comment(lib, "???")</CODE> =
according=20
to your DLL produced .lib files.=20
<H2>Remarks</H2>
<P>This architecture makes possible to add other features to the class. =
It would=20
be possible for example to add the support for the select-computer =
common=20
dialog. If someone implements new features I will happy to include his =
code in=20
the next <CODE>CFileDialogST</CODE> demo application. </P>
<HR>
<TABLE cellSpacing=3D0 cellPadding=3D0 border=3D0>
<TBODY>
<TR>
<TD width=3D40><IMG height=3D32=20
src=3D"http://www.softechsoftware.it/images/copyright.gif" =
width=3D32=20
border=3D0></TD>
<TD><I>2001-2004 by <A=20
=
href=3D"http://www.softechsoftware.it/contact.html">SoftechSoftware</A></=
I></TD></TR>
<TR>
<TD width=3D40><IMG height=3D32=20
src=3D"http://www.softechsoftware.it/images/icon_home.gif" =
width=3D32=20
border=3D0></TD>
<TD><I><A href=3D"http://www.softechsoftware.it/main.html"=20
=
target=3D_parent>Home</A></I></TD></TR></TBODY></TABLE></BODY></HTML>
------=_NextPart_000_0035_01C75E42.2BA6E980
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Location: http://www.softechsoftware.it/images/cfiledialogst.jpg
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEP
ERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4e
Hh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCAHDAtEDASIA
AhEBAxEB/8QAHQABAAMAAwEBAQAAAAAAAAAAAAUGBwIDBAgBCf/EAGsQAAEDAwICAwYOCRAFCAoB
BQECAwQABREGEhMhBxQxFRciUZTSFiMyQUJSVVZhYpWk0dM3VFdzgZGTsuMIJDM0NkVGcXR1g6Ol
s7TDRFOSouIlNUNkdqGx4WNlcoKElrXB1fA48RgmZsT/xAAbAQEBAQADAQEAAAAAAAAAAAAAA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5FxzYZ/j2CuXIZPn2NeuBHlRmrXBEeUEB1ol0g7CSD
nfkHJ8frD4a7hqW5gySksp4xaKcIwGA0rchKB2BIPrEH/wAa33iRcftdj/YFA5F/1DH4WxTIIMLZ
1ZNadDjMOE2RKXKVgLIU4pCkknKzywrsGK8/ogmdT4HCY4nVOp8fad/BznbjO34M4z8Oedb5xIuf
2ux/HwxTiRPtdn8mKZAYpK1DHftklDjHHmzOB1hZbLaVcPB54Wc5xjwQjtJ+CoqVc1v29MBuOxGj
JdLxQ1uO5e3GSVKUezxYrf8AiRQebDP5MV+8SKP9HY/2BTID5+u09653B2dIS2lxzG4IBAGAB65+
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -