如何在一个Dialog中嵌入CFileDialog,最好能提供一些示例代码,多谢。
(或是在CFileDialog中嵌入别的控件,CEdit等)

解决方案 »

  1.   

    在CFileDialog的界面中我还需要一些别的控件(比如说两个CEdit)
      

  2.   

    可以自己定制系统提供的CFileDialog的。参考:
    http://www.vckbase.com/document/viewdoc/?id=417
      

  3.   

    This constructor creates an instance of a standard Windows CE file dialog box-object. Either a Open or Save As dialog box is constructed, depending on the value of bOpenFileDialog.The following code example demonstrates how to use CFileDialog to rename or move an existing file dialog box. My Documents and docs are directories and new file is the new name of the file dialog box.CFileDialog dlg(FALSE, NULL, TEXT("\\My Documents\\docs\\new file"),
            OFN_PROPERTY);The following code example demonstrates how to use CFileDialog to create a new file dialog box.CFileDialog dlg(TRUE, NULL, NULL, OFN_PROJECT);CFileDialog(
    BOOL bOpenFileDialog,
    LPCTSTR lpszDefExt = NULL,
    LPCTSTR lpszFileName = NULL,
    DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
    LPCTSTR lpszFilter = NULL,
    CWnd* pParentWnd = NULL);参照msdn
    在看看楼上的例子!
      

  4.   

    可以对CfileDialog进行二次开发
    研究一下kugou123的例子
    还有
    http://www.codeproject.com/dialog/
    下很多关于CfileDialog界面定制的例子
      

  5.   

    我也有相同的问题
    帮忙顶一下我现在正在按照《Visual C++ 技术内幕》一点一点学,正好学到这了
    那里面有个例子ex07b,就是讲嵌入式的对话框,正好也是把CFileDialog装在一个模板里面
    可是我照着做了,结果却有些可笑:
    居然弹出了两个对话框
    http://img.photobucket.com/albums/v392/pkufeng/dialog.jpg
    哪位大侠能提示一下为什么会有这种情况,谢谢啦谢谢kugou123等的提示,偶再去学学其他的例子
      

  6.   

    如果你只须需要文件夹视图的话,用浏览器控件就可以了。
    参考http://blog.joycode.com/jiangsheng/archive/2004/11/22/39413.aspx