On Sat, 02 May 2009, Rob May wrote: > 2009/4/22 Jan Dubois <j...@activestate.com>: > I've had a chance to play further, and at least on XP once the > perl.exe manifest required V6 of the common controls I can find no way > to get back to using the V5 controls in an extension. Theoretically is > should be possible to build perl with ISOLATION_AWARE_ENABLED defined, > but then all extension DLL will use V5 of the common controls, > somewhat defeating the purpose of asking for them in manifest in the > first place. > > I don't think this is a reason not to have the perl.exe manifest > request v6 common controls, but thought I should mention this as a > potential problem.
The fact that you can programmatically request v6 controls without having to add a manifest is enough reason to prevent adding this part of the manifest for at least Perl 5.10.x, especially if you cannot programmatically switch back to *not* require v6. As to using v5 controls from a process that has v6 in its manifest I would try something like this: * Add a second manifest resource to your extension DLL that doesn't specify v6 controls. Use any user defined resource name you want. * Call CreateActCtx() with an ACTATC structure that has includes the resource name for this alternate manifest. * Activate this manifest. > As I was getting fed up with adding/removing a manifest file from the > perl bin directory to test apps with and without manifests, I've > written a small module that can turn on visual styles > (Win32::VisualStyles). Code can be download from > http://rob.themayfamily.me.uk/win32-gui/win32-visualstyles - I'd > appreciate feedback on the interface and whether it works for you. If > I get positive feedback I'll finish tidying up the documentation and > release it as a CPAN module. I've not put it in the Win32::GUI > namespace, as I think it has wider applicability. I haven't tried it yet, but it looks like a good idea. +1 on separating it out from Win32::GUI. Random comments just from looking at the source: * The manifest file contains a hardcoded X86 architecture. The file should be generated dynamically and contain AMD64 as the architecture for 64-bit Windows on x86_64. Something like this: http://github.com/jandubois/perl/blob/45b29eb26a4450f83f586c2fc2e47964713cc910/win32/perlexe_manifest.PL * The SYNOPSIS uses IsThemeActive() and IsAppThemed() without importing them. * I would normally just copy the required Windows SDK definitions into the *.xs file so that the code can be compiled with just VC6/MinGW and doesn't need a Windows SDK installation. * Why are you calling LoadLibraryW() instead of LoadLibraryA()? Most of the feedback above is probably just personal taste, except for the architecture string in the manifest on 64-bit Windows. I hope I'll get some time soon to actually play with it a little (e.g. see if it otherwise works on 64-bit). Cheers, -Jan ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/