Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CFileDialog and Vista + Win7 problem!

CFileDialog and Vista + Win7 problem!

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Arrin
    wrote on last edited by
    #1

    Hello community, i make my own CFileDialogEx derived from CFileDialog, with some new controls on it, but if i run my program on vista or win7, this new controls are not visible, mean, it is the standard Vista File dialog showed, but not my own! How to solve this, so that my CFileDialogEx is showed?? The constructor of my file dialog is called, but newer this OnInitDialog() of my custom file dialog!! :( In the MSDN says that there is a new parameter BOOL bVistaStyle and i set them to FALSE, but i see again the vista standard CFileDialog, not my own!! :( Does any one have a idea how to solve this, so i can use my custom CFileDialogEx(derived from CFileDialog)!? I hope its understandably what i have wrote :( In XP is all there, my complete CFileDialogEx! thanks for any help! Arrin

    M 1 Reply Last reply
    0
    • A Arrin

      Hello community, i make my own CFileDialogEx derived from CFileDialog, with some new controls on it, but if i run my program on vista or win7, this new controls are not visible, mean, it is the standard Vista File dialog showed, but not my own! How to solve this, so that my CFileDialogEx is showed?? The constructor of my file dialog is called, but newer this OnInitDialog() of my custom file dialog!! :( In the MSDN says that there is a new parameter BOOL bVistaStyle and i set them to FALSE, but i see again the vista standard CFileDialog, not my own!! :( Does any one have a idea how to solve this, so i can use my custom CFileDialogEx(derived from CFileDialog)!? I hope its understandably what i have wrote :( In XP is all there, my complete CFileDialogEx! thanks for any help! Arrin

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      I've used CFileDialog with extra UI (extra dialog) attached to it, and had to use the new bVistaStyle flag to make it work on Vista; the constructor gets called, as well as the OnInitDialog.

      class MyFileDialog: public CFileDialog
      {
      //...
      DECLARE_DYNAMIC(MyFileDialog)
      //...
      };

      MyFileDialog::MyFileDialog(LPCTSTR lpszFilter , LPCTSTR lpszDefExt, LPCTSTR lpszFileName, CWnd* pParentWnd) :
      CFileDialog(TRUE, lpszDefExt, lpszFileName,
      OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_SHOWHELP | OFN_EXPLORER | OFN_ENABLETEMPLATE , lpszFilter, pParentWnd, 0, FALSE)
      {
      //...
      //add custom controls in CFileDialog
      SetTemplate(0,IDD_MYCUSTOM_DIALOG);
      //...
      }

      I don't think we do any other initializations for the application. Can you try it with a simple barebone project ? good luck. Max.

      This signature was proudly tested on animals.

      A 1 Reply Last reply
      0
      • M Maximilien

        I've used CFileDialog with extra UI (extra dialog) attached to it, and had to use the new bVistaStyle flag to make it work on Vista; the constructor gets called, as well as the OnInitDialog.

        class MyFileDialog: public CFileDialog
        {
        //...
        DECLARE_DYNAMIC(MyFileDialog)
        //...
        };

        MyFileDialog::MyFileDialog(LPCTSTR lpszFilter , LPCTSTR lpszDefExt, LPCTSTR lpszFileName, CWnd* pParentWnd) :
        CFileDialog(TRUE, lpszDefExt, lpszFileName,
        OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_SHOWHELP | OFN_EXPLORER | OFN_ENABLETEMPLATE , lpszFilter, pParentWnd, 0, FALSE)
        {
        //...
        //add custom controls in CFileDialog
        SetTemplate(0,IDD_MYCUSTOM_DIALOG);
        //...
        }

        I don't think we do any other initializations for the application. Can you try it with a simple barebone project ? good luck. Max.

        This signature was proudly tested on animals.

        A Offline
        A Offline
        Arrin
        wrote on last edited by
        #3

        Hi, thanx for answer, and i have a own dialog with controls that i show bottom of this standard CFileDialog controls, bottom of combobox of file types. And the constructor gets called too, but not the OnInitDialog() of my custom dialog(its a modeless dialog as parent), i work on XP system! I try with SetTemplate()! regards Arrin

        A 1 Reply Last reply
        0
        • A Arrin

          Hi, thanx for answer, and i have a own dialog with controls that i show bottom of this standard CFileDialog controls, bottom of combobox of file types. And the constructor gets called too, but not the OnInitDialog() of my custom dialog(its a modeless dialog as parent), i work on XP system! I try with SetTemplate()! regards Arrin

          A Offline
          A Offline
          Arrin
          wrote on last edited by
          #4

          Hi, SetTemplate() dont works :( any other idea?? regards Arrin

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups