I'm trying to create a dialog that hosts a file preview handler. I started by creating an ATL dialog (through the Visual Studio menu), which derives from CDialogImpl, so that part was pretty straightforward.
But I've now learned that hosting a preview handler involves implementing IPreviewHandlerFrame. So I guess I have to derive from that, implement its methods, and implement IUnknown as well. And then I guess that the dialog needs to be created via CoCreateInstance? (Not sure about that part.)
So I'm not sure if I should go back and start over, instead creating an ATL Object that derives from CDialogImpl and IPreviewHandlerFrame. That would involve all of the ATL registration and everything, and I'm not sure if that's necessary . Or is it better just to add the IUnknown methods? But even so, how would the class be instantiated? I'm not sure I want to interfere in the ref-counting or anything like that.
Thanks for any guidance on how to do this.
Or maybe another approach would be to implement IPreviewHandlerFrame in its own ATL class, and then instantiate it in the CDialogImpl?