Places Bar on CFileDialog

Hello all,
I'm using a custom save dialog inherited from the CFileDialog.
The problem is that the Places Bar is hidden, and I can't show it.
Can anyone help me please !!



Answer this question

Places Bar on CFileDialog

  • Charles G.-Marcil

    Thanks a lot Martin.

    I think this article is a good one.

    But a problem encountered me while updating my dialog as in the article. The problem was that I use the “edt1” which is the File Name edit box control to change it’s position. But in the new Dialog, it seems that MFC change the dialog template when changing the size of OPENFILENAME structure, and the edt1 edit box replaced with the cmp13 combo box.

    I have another answer about the IShellBrowser::BrowseObject that I used to manipulate my custom Places Bar before finding the article you told me about. But I think it is another subject, so I will put it in another question.

    Thanks alot.



  • SRavi

    Thanks Ted,
    I will try it on WinME.


  • mcclurgj

    Are you using MFC 4.2 with VC6

    If this is the case the following link is the answer:
    http://msdn.microsoft.com/msdnmag/issues/0800/c/



  • Syva

    One thing to mention is that the places bar is also available for Windows Millennium edition (version 4.90), so you might want to change the definition of IsWin2000 to include version 4 (major) 90 (minor) version so Windows Me will get the benefit of the places bar.

    Another way to do the same (use at own risk) is to simply add 12 to the structure size

    if(IsWin2000())

    dlg.m_ofn.lStructSize = sizeof (OPENFILENAME) + 12;

    This relies on the fact that the 12 bytes after m_ofn in CFileDialog are usually not important in most apps after dialog creation.


  • Places Bar on CFileDialog