Re: [GD-Windows] Custom OpenFile Dialog
Brought to you by:
vexxed72
From: Rich <leg...@xm...> - 2002-10-20 00:27:09
|
In article <007301c277cd$339b4510$1402a8c0@paul1>, "Paul Crowder" <pa...@pa...> writes: > Reading through the msdn docs, it would appear it is possible to create a > customised OpenFile dialog, as used by GetOpenFileName and GetSaveFileName. > For example, a dialog that contains some sort of preview pane, or extra > options on what to do when loading a file. While it would appear possible, > little direction is really given, so before I start feeling around in the > dark recesses of the win32 API I was wondering if anyone else has any > experience with this or knows of any examples? The OFNHookProc appears to > be the way in and it looks as though you have to create a dialog template of > some sort, but should this be a full open/save dialog box or just the extra > controls you want? Customizing any of the common dialogs is pretty simple once you have a working template. I have a template in my sample code where I modify the common color chooser dialog to include a box for entering the alpha value for a color. Download this sample <http://www.xmission.com/~legalize/book/snippets/index.html#6> and take a look at colorsel.h and colorsel.cpp for the implementation and winmain.rc for the resource templates you will need for customizing the color dialog. I got this from MSDN docs under Platform SDK / User Interface Services / Windows User Interface / User Input / Common Dialog Box Library / About Common Dialog Boxes / Customizing Common Dialog Boxes. -- Ask me about my upcoming book on Direct3D from Addison-Wesley! Direct3D Book <http://www.xmission.com/~legalize/book/> izfree: Open source tools for Windows Installer <http://izfree.sourceforge.net> |