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. Removing combo box from filedialog

Removing combo box from filedialog

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studio
2 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.
  • V Offline
    V Offline
    vilmer
    wrote on last edited by
    #1

    Hi, I need to remove the lower combo box in a File Dialog (I mean the one which let you choose the file type). I've tried with HideControl(cmb1) where cmb1 is the ID of that combo box, but I can't hide it (the command works with the other two Combo boxes). Notice: I'm using VS 2003.NET, the File dialog is a bit different from the old one. Thanks Vilmer

    D 1 Reply Last reply
    0
    • V vilmer

      Hi, I need to remove the lower combo box in a File Dialog (I mean the one which let you choose the file type). I've tried with HideControl(cmb1) where cmb1 is the ID of that combo box, but I can't hide it (the command works with the other two Combo boxes). Notice: I'm using VS 2003.NET, the File dialog is a bit different from the old one. Thanks Vilmer

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      I've not tried this exact thing, but have done something similar. Derive a class from CFileDialog. At the end of the OnInitDialog() method, post a message. In the handler for that message, call ShowWindow(..., SW_HIDE) on the control you want to hide. If you are not using MFC, you can do the same thing using GetOpenFileName(). Just specify a hook procedure in the lpfnHook member variable. In the hook procedure, handle the WM_INITDIALOG by posting the same message as mentioned before. Hopefully this will solve your problem, or at least point you down the right path.


      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      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