FPiette 383 Posted February 9, 2023 Hello, I'm trying to write a shell property sheet extension. The DLL with the COM object is not an issue for me since I already done that kind of work with my context menu extension (That's easy with Delphi). But for a property sheet extension, the COM object must implement IShellPropSheetExt. In that interface AddPage method must create the UI. There are many C++ examples on the web but I did not found any Delphi example. The C++ examples all use the old Windows dialog box feature. I don't want to use a windows dialog box but a Delphi form. I have no idea how to do that and search for some Delphi example or tutorial (Already done extensive Google searches without success). Any help will be appreciated! Thanks. Share this post Link to post
Anders Melander 1784 Posted February 9, 2023 I can't see any way to create a property sheet without using a dialog template. Maybe you can just use an empty dialog template and then inject your Delphi form when the page is displayed? Share this post Link to post
FPiette 383 Posted February 9, 2023 8 minutes ago, Anders Melander said: Maybe you can just use an empty dialog template and then inject your Delphi form when the page is displayed? A Delphi VCL form is a standard window. It is probably possible to overload a dialogbox control using a parented Delphi form. That's what I'm trying to do to begin. Share this post Link to post
Anders Melander 1784 Posted February 9, 2023 2 minutes ago, FPiette said: A Delphi VCL form is a standard window. It is probably possible to overload a dialogbox control using a parented Delphi form. Yes; That's what I wrote. procedure InjectMyForm(HandleOfControlOnPropertyPage: HWND; MyForm: TForm); begin SetParent(MyForm.Handle, HandleOfControlOnPropertyPage); ...lots of stuff to do with positioning and window style... end; 1 Share this post Link to post
FPiette 383 Posted February 19, 2023 On 2/9/2023 at 12:40 PM, Anders Melander said: Maybe you can just use an empty dialog template and then inject your Delphi form when the page is displayed? That's what I have done and it works. The trick is to use an empty template and then from WM_INITDIALOG create a parented Delphi VCL form. 1 1 Share this post Link to post