2009/5/4 Jan Dubois <j...@activestate.com>: > 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.
In general I agree - from the point of view of the Win32::GUI package I'm indifferent. > 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. I've tried this (at least on XP). (and in the process worked out most of the undocumented/badly documented parts of the ACTCTX structure). I've tried several ways (I can let you have my test code if you're interested). Under XP I can't find any way to get back from a V6 activation context to a V5 activation context. (A manifest with no dependancy on any Comctrl32 doesn't seem to do the trick; A manifest with an explicit 5.80/1/2 dependence fails to create an activation context). I haven't tried under Vista, where it might be possible to explicitly request a v5.8 comctl32.dll, as I notice that v5 comctrl32 entries in the WinSxS directory - which doesn't happen in XP. I'll try to find some time for a little further investigation, as I'm sure it should be possible - but I haven't found a way yet. >> I've written a small module that can turn on visual styles >> (Win32::VisualStyles). > 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 Thanks - According to the "spec" (http://msdn.microsoft.com/en-us/library/aa374191(VS.85).aspx) the processorArchitecture attribute is optional. If omitted I think it would mean all architectures. I'm pretty sure I've also seen processorArchitecture="*" - but can't find any examples/documentation immediately. I'll work out a suitable course of action and modify the manifest/ add _manifest.PL as appropriate. > * The SYNOPSIS uses IsThemeActive() and IsAppThemed() without importing them. Thanks - I'll modify. > * 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. I'll look at this. I always find it difficult to find suitable defines to use as guards around structure definitions, so that it also works with an SDK installation, but that's not insurmountable. > * Why are you calling LoadLibraryW() instead of LoadLibraryA()? Mainly because I 'borrowed' the code. The reality is that once we're at that point in the code we know that we've got LoadLibraryW ... and calling LoadLibraryW will be marginally faster than LoadLibraryA, which AFAICT will be a wrapper around LoadLibraryW, with a MultiByteToWideChar call. I don't think it really matters, and for the sake of not breaking a non-delay-loading build I'll change it to 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). Many thanks for the feedback. Might this be a candidate for inclusion in libwin32 (or whatever that's become)? Rob. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ 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/