关于CFileDialog 的问题,在线等,马上给分
我想改变CFileDialog 对话矿的标题,及打开按钮的文本,该怎么办,请各位
高手指点!!!!
问题点数:20、回复次数:5Top
1 楼eastred(东方红)回复于 2003-12-01 18:43:45 得分 2
CFileDialog(
BOOL bOpenFileDialog,
LPCTSTR lpszDefExt = NULL,
LPCTSTR lpszFileName = NULL,
DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
LPCTSTR lpszFilter = NULL,
CWnd* pParentWnd = NULL);
Parameters
bOpenFileDialog
Set to TRUE to construct a File Open dialog box or FALSE to construct a File Save As dialog box.
lpszDefExt
Specifies the default filename extension. If the user does not include an extension in the filename edit box, the extension specified by lpszDefExt is automatically appended to the filename. If this parameter is NULL, no file extension is appended.
lpszFileName
Specifies the initial filename that appears in the filename edit box. If NULL, no filename initially appears.
dwFlags
Specifies a combination of one or more flags that allow you to customize the dialog box. For a description of these flags, see the OPENFILENAME structure. If you modify the m_ofn.Flags structure member, use a bitwise-OR operator in your changes to keep the default behavior intact.
lpszFilter
Specifies a series of string pairs that specify filters you can apply to the file. If you specify file filters, only selected files will appear in the Files list box. See the Remarks section for more information on how to work with file filters.
pParentWnd
Specifies a pointer to the parent or owner window of a file dialog-box object.
Top
2 楼phoenixli(feitian)回复于 2003-12-01 20:02:36 得分 2
只有从CFileDialog派生一个新类了。Top
3 楼dylang(眼睫毛)回复于 2003-12-01 22:00:46 得分 1
打开按钮的文本?Top
4 楼dylang(眼睫毛)回复于 2003-12-01 22:02:53 得分 1
按钮的文本自己定义啊,
不太明白你的意思
在按钮函数里作CFileDialog操作啊Top
5 楼flyelf(空谷清音)回复于 2003-12-02 09:42:19 得分 14
从CFileDialog派生一个新类,如CMyFileDialog
在OnInitialUpdate中更改
::SendMessage( GetParent()->GetDlgItem(IDOK)->GetSafeHwnd(),
WM_SETTEXT, 0, (LPARAM)_T("YourCaption(&Y):"));
Top




