Click to See Complete Forum and Search --> : customized open file dialog


marcin - rem
September 22nd, 2005, 01:57 PM
Every file dialog has the view option (dropdown list) where user can choose between detailed or thumbnailed and other views. I don't want my users to set the view every time the open file dialog is opened. So how to open the open file dialog with GetOpenFileName function and OPENFILENAME structure and the thumbaniled view and picture preview on the right side where user can see the picture of the file selected in the dialog? Thanks for advise, marcin - rem.

kirants
September 22nd, 2005, 04:25 PM
Here are some threads related to this..
http://www.codeguru.com/forum/showthread.php?t=312067&highlight=dlgs.h
This might provide a hint what to look for. Basically, you need to provide your own hookprocedure by setting OFN_ENABLEHOOK flag in the OPENFILENAME structure. You will then be able to listen to WM_INITDIALOG. Here in you would look for the list control that shows those files/folders and change the style to say thumbnail mode.

I haven;t done this, so I am just providing you some theory for you to play around..

BTW, the preview thingy is not standard and I would think you have to provide a custom template also to show it and then listen to list sel changed notification to change the preview image

marcin - rem
September 22nd, 2005, 06:28 PM
Thanks for reply. Does it give me 100% sure that it will work on every windows system?

kirants
September 22nd, 2005, 06:48 PM
Frankly. I don't know since I haven't researched it in that much depth and haevn't seriously done with that stuff. Although the control ID thingy looks scary...I doubt if MS will change it. If it were to change, why would they publish it in their header file ?