XP Skin Support only for EXEs and not DLLs?

Windows specific forum
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

XP Skin Support only for EXEs and not DLLs?

Post by Straker »

Hi All.

I have a DLL which utilizes a window to display a progressbar gadget, however on Windows XP it still shows the non-themed progressbar even though I have checked "Enable XP Skin support".

So my question is:

Does the "Enable XP Skin support" only work for EXEs and not DLLs which have themable gadgets?

Thanks
:?:
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post by Straker »

Wow - did I stump everyone with this one, or do I need breath mints?
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

I always thought that if you open a window created from a dll then it gets the properties, such as manifest from the program which launches it, am I wrong there?
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Hydrate
Enthusiast
Enthusiast
Posts: 436
Joined: Mon May 16, 2005 9:37 pm
Contact:

Post by Hydrate »

I always assumed it got the properties from what launched it, with the programs that i use and have the xp theme so does my dll, where it doesnt, the same dll displays without themes...
Gansta93
Enthusiast
Enthusiast
Posts: 238
Joined: Wed Oct 20, 2004 7:16 pm
Location: The Village
Contact:

Post by Gansta93 »

It is not just for xp skins, it is for all resources (Compiler options, Resources tab). Version informations are also ignored. Why ? Will that be changed?
Be seeing you! :-)

Gansta93
If you speak french, you can visite Le Monde de Gansta93 (Gansta93's World)
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Gansta93 wrote:It is not just for xp skins, it is for all resources (Compiler options, Resources tab). Version informations are also ignored. Why ? Will that be changed?
Any workaround to have XP skin support on dll windows?
ARGENTINA WORLD CHAMPION
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

from microsoft's platform sdk documentation:
Using ComCtl32 Version 6 in an Application That Uses Extensions, Plug-ins, or a DLL That Is Brought into a Process
The following are examples of applications that use extensions.

Microsoft Management Console (MMC)
Windows Shell
Microsoft Visual Studio®
ComCtl32.dll version 6 is not completely backward compatible because some of the controls are modified and new controls are added. Using version 6 of the common controls might require code changes in your application. If an application uses extensions developed by a third party, you cannot change the extension if you have compatibility issues. The following steps describe how you can apply a visual style to your application without impacting an extension.

To create a manifest and enable your application to use visual styles.

Include the common controls header file as follows:
#include "commctrl.h"

Compile your application with the -DISOLATION_AWARE_ENABLED flag or insert the following statement before the #include "windows.h" statement.
#define ISOLATION_AWARE_ENABLED

Add a file called YourApp.manifest to your source tree that uses the XML manifest format.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApplication"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

Add the following statement to your application.
#define MANIFEST_RESOURCE_ID 2

Add the manifest to your application's resource file as follows:
MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.manifest"

//Winuser.rh includes the following defines:
//#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1

Using ComCtl32 Version 6 in Control Panel or a DLL That Is Run by RunDll32.exe
To create a manifest and enable your application to use visual styles.

Link to ComCtl32.lib and call InitCommonControls.
Add a file called YourApp.cpl.manifest to your source tree that has the XML manifest format.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApplication"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

Add the manifest to your application's resource file as resource ID 123.
Note When you author a Control Panel application, place it in the appropriate category. Control Panel now supports categorization of Control Panel applications. This means that Control Panel applications can be assigned identifiers and separated into task areas such as Add or Remove Programs, Appearance and Themes, or Date, Time, Language, and Regional Options.
Adding Visual Style Support to MMC Snap-ins
Support for visual styles may be added to more types of applications than the three previously described. For example, if you are writing a MMC snap-in you can add visual style support.

Compile your application with the -DISOLATION_AWARE_ENABLED flag or insert the following statement before the #include "windows.h" statement.
#define ISOLATION_AWARE_ENABLED

Include the common control header file in your snap-in source.
#include "commctrl.h"

Add a file called YourApp.manifest to your source tree that uses the XML manifest format.

Show Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="YourCompanyName.YourDivision.YourApplication"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

Add the manifest to your application's resource file. See Using ComCtl32 Version 6 in an Application That Uses Extensions, Plug-ins, or a DLL That Is Brought into a Process for details on adding a manifest to a resource file.

btw manifests are the things that let ure app use xp styles
so maybe u have to put a manifest as resoucre id 2? or 123?
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
Post Reply