Notes

Attila support for common dialogs is factored into pairs of classes,
where each pair is equivalent to one of the Windows common dialogs.
One member of the pair is basically a thin wrapper over the Windows
API and the other adds hook support.  This way, hooking the
common dialogs is supported, but you don't have to pay for the
overhead if you don't want it.

I chose to utilize the hook functionality instead of subclassing
the dialog because Windows calls the hook function directly under
certain circumstances.  In this case, subclassing would not see the
message.

Because there is no reliable way to replace the hook function after
the dialog has been created, I couldn't use the ATL trick of
specifying one function as the hook proc and then switching it to
the thunk once the first message has been received.  Instead, I set
the thunk up front and use a CBT hook to grab the window handle.

MFC was used as a rough outline for function names and parameters.


// Base classes

CCommonDialogT<typename T>
	: public T
CHookedCommonDialogT<typename TBase = CWindow>
	: public CWindowImplBaseT<TBase, CNullTraits>

// File-related classes

CFileDialog
	: public CCommonDialogT<OPENFILENAME>
CHookedFileDlgT<typename TBase = CWindow>
	: public CHookedCommonDlgT<TBase>
CFileOpenDialog
	: public CFileDialog
CFileOpenDialogEx<typename TBase = CWindow>
	: public CFileDialog,
	  public CHookedFileDlgT<TBase>
CFileSaveDialog
	: public CFileDialog
CFileSaveDialogEx<typename TBase = CWindow>
	: public CFileDialog,
	  public CHookedFileDlgT<TBase>

// Print-related classes

CPrintSupportDlgT<T>
	: public CCommonDialogT<T>
CPrintDialog
	: public CPrintSupportDlgT<PRINTDLG>
CPrintDialogEx<typename TBase = CWindow>
	: public CPrintDialog,
	  public CHookedCommonDlgT<TBase>
CPageSetupDialog
	: public CPrintSupportDlgT<PAGESETUPDLG>
CPageSetupDialogEx<typename TBase = CWindow, typename TPaint = CWindow>
	: public CPageSetupDialog,
	  public CHookedCommonDlgT<TBase>

// Other classes

CFontDialog
	: public CCommonDialogT<CHOOSEFONT>
CFontDialogEx<typename TBase = CWindow>
	: public CFontDialog,
	  public CHookedCommonDlgT<TBase>
CColorDialog
	: public CCommonDialogT<CHOOSECOLOR>
CColorDialogEx<typename TBase = CWindow>
	: public CColorDialog,
	  public CHookedCommonDlgT<TBase>
CFindReplaceDialog
	: public CCommonDialogT<FINDREPLACE>
CFindReplaceDialog<TDeriving, typename TBase = CWindow>
	: public CFindReplaceDialog,
	  public CHookedCommonDlgT<TBase>

