Removing combo box from filedialog
-
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
-
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
I've not tried this exact thing, but have done something similar. Derive a class from
CFileDialog
. At the end of theOnInitDialog()
method, post a message. In the handler for that message, callShowWindow(..., SW_HIDE)
on the control you want to hide. If you are not using MFC, you can do the same thing usingGetOpenFileName()
. Just specify a hook procedure in thelpfnHook
member variable. In the hook procedure, handle theWM_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