我想改变CFileDialog 对话矿的标题,及打开按钮的文本,该怎么办,请各位
高手指点!!!!

解决方案 »

  1.   

    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 Res 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. 
      

  2.   

    只有从CFileDialog派生一个新类了。
      

  3.   

    按钮的文本自己定义啊,
    不太明白你的意思
    在按钮函数里作CFileDialog操作啊
      

  4.   

    从CFileDialog派生一个新类,如CMyFileDialog
    在OnInitialUpdate中更改
    ::SendMessage( GetParent()->GetDlgItem(IDOK)->GetSafeHwnd(),
    WM_SETTEXT, 0, (LPARAM)_T("YourCaption(&Y):"));