Just trying to implement a derived class of wxFrame that has CS_DROPSHADOW specified in its WNDCLASS. MSW specific for now.
Is there a DRY way to do this? Looking through wx sources (3.0.4), it looks to me like I'm going to have top copy/paste an awful lot of code from wxFrame to do that. And then I have a maintenance issue.
MSWCreate is not virtual (and clearly cannot be as it is called from the ctor). AFAICS there is no way of overriding wxWindowMSW::MSWGetRegisteredClassName either.
Is there something obvious I'm missing here?
If not then I wonder if perhaps window creation could be reworked a bit do decouple window creation from the window class itself. There could be a wxWindowCreator class that has virtual functions to customize this process (template method pattern).
Then it would be trivial to do this kind of thing - just inject a new window creator that overrides wxWindowCreator::MSWGetRegisteredClassName and you avoid the issue of virtual behaviour in the ctor.
Even just being able to set a function pointer to override MSWCreate or MSWGetRegisteredClassName before calling Create would be really handy.
Using custom WNDCLASS for wxFrame subclass (MSW)
Re: Using custom WNDCLASS for wxFrame subclass (MSW)
Just did copy and paste but the shadow looks so feeble I decided to do it a different way with a layered window.