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. Managed C++/CLI
  4. CFileDialog doesn't update when I change the file type.

CFileDialog doesn't update when I change the file type.

Scheduled Pinned Locked Moved Managed C++/CLI
questionc++helpannouncement
1 Posts 1 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.
  • I Offline
    I Offline
    IlanTal
    wrote on last edited by
    #1

    I am using CFileDialog for a "save as" where I have to choices for file types: All Files or Avi Files. I noticed something very strange and discovered it is DIRECTLY related to Managed C++. First of all, the "save as" function is done correctly, so 99% of the problem is solved. It comes up with All Files and indeed shows all files. The problem comes when I change to show only avi files. The window goes blank. If I go back to all files, it stays blank. Only if I choose a different folder is it refreshed properly (with either all or avi files). I tried it in Paint and there if you change the file type, the window refreshes correctly. In CFileDialog it doesn't. My code is: CFileDialog filedlg( FALSE, "avi", // default extension "mip1.avi", // current file name OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_LONGNAMES, "All Files (*.*)|*.*|Avi Files (*.avi)|*.avi||", NULL); Since starting to look into this problem I found out that the problem exists ONLY when I use Managed extensions. When I turn off Managed extensions, it refreshes perfectly, like it has always done. To complete the picture I tried GetSaveFileName( &ofn) and that shows exactly the same behaviour. Has anyone else seen this, or can tell me what is wrong? Thanks, Ilan

    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