|
I tried both the 24 w/ 1 and 24 w/ 2 options to try and get my custom namespace extension to display Windows XP skinning and it didn't work. Maybe I screwed something up, I'm using VC++ 6 and I just updated my PSDK. I built off of this namespace example: http://www.codeproject.com/shell/namespcextguide1.asp
|
|
|
|
|
If anyone else is trying to do this, i found the answer in another post. I had to use 24 w/ 3 to get it to work (#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3).
|
|
|
|
|
I want to use de manifest, which seems to work ok. But when I create a MessageBox, I hear de sound, but there is no visual. What is wrong?
LPCSTR Dutch = "Double Dutch "
|
|
|
|
|
Hello,
I have this identical problem now. Have you somebody some solution for this problem. Please ...
Thank you
AJKR
|
|
|
|
|
#define DOCHOSTUIFLAG_THEME 0x40000
and
->put_DocHostFlags(dwFlags | DOCHOSTUIFLAG_THEME);
That's it. Easy?
|
|
|
|
|
Hi !
I have written an application which host web browser (VC6/MFC) ; the content is html page that take xp look with MSThemeCompatible meta ! To have a date control in my pages, I have written an OCX which subclass DATETIMEPICK_CLASS but this control does not table xp look, even if I put a manifest in application or/and in ocx project...
How may I do ?
Thanks for any help
Emmanuel Derriey
|
|
|
|
|
Maybe this will help:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp
There is a section called "Using Visual Styles with a Custom Control" that probably has the information you are looking for.
|
|
|
|
|
Current I am working on a project which using BHO, a kind of DLL that can hack into IE workspace.
I have implement some dialog box with toolbar control, which I want to apply the XP theme. But it does not works.
Do you have any idea on make such kind of DLL also get the XP theme?
Thanks in advance
|
|
|
|
|
Okay, here's how I did it. First, you must put
#define ISOLATION_AWARE_ENABLED 1
before any windows headers are included. If you are using StdAfx.h, put it right before the MSC_VER check, and you needn't modify any other files.
Next, you must add a custom resource. Do that by opening the resource editing tab, right clicking on the root folder, selecting "Insert", then pressing the Custom button. When it asks for the resource type, enter 24.
Now you have a folder called 24 with a resource named IDR_DEFAULT. Right click on IDR_DEFAULT, select properties, and change the ID to 2.
In the right hand pane, you should have "000000" with a cursor blinking. Copy below between the dashed lines and paste next to the 000000. Do not worry about any of the text here... it does not need to match the name of any of your stuff, as it turns out. Clean it up later once you get things working.
------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
processorArchitecture="x86"
version="5.1.0.0"
type="win32"
name="test.exe"/>
<description>Test Application</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="x86"/>
</dependentAssembly>
</dependency>
</assembly>
------------------------------------
Now your common controls should launch from a DLL with a WinXP Themes look. Using this method, I got Windows Themes active for a custom pane attached to Device Manager, as well as a DLL plug-in into a commercial program that is not even WinXP Themes aware. Very nice.
I think the key here is using an ID of 2, instead of 1. This will become apparent if you open up winuser.h from the SDK (Not VisualStudio) and search for ISOLATIONAWARE.
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
-todd-
today AT Asylum Research DOT com
|
|
|
|
|
There is one problem with that solution => it requires MFC7!!!...
|
|
|
|
|
I followed your code for a DLL in Visual C++.NET and it worked perfectly. Then I tried the original posting's solution --- this time for a VC6 MFC executable, and again, all worked perfectly.
I then tried your code with an ATL Composite Control DLL project in VC6 and, no matter what I did, it never behaved. Assuming that the problem was VC6 and/or an older Platform SDK, I ported the VC6 project into .NET and tried again. Once again, the composite control DLL doesn't display correctly. I am guessing there is a difference in either the project or framework which causes the manifest to be ignored. Any help would be appreciated, especially with respect to building the VC6 DLL.
Thanks, RPR
RPR
|
|
|
|
|
I finally figured this out. You can, in fact, create XP themed DLLs in VC6. The trick is in insuring that the currently available IE and Platform SDKs are first in your search order. IE has the most current version of ComCtl32.lib, followed by the Platform SDK, and finally MS Dev. -RPR-
|
|
|
|
|
I am writing a OCX that can be activated from IE. My control shows a dialog in its OnCreate function. I try to follow the instruction but cannot have winxp theme on my dialog.
I had Microsoft SDK and in VC6 option, I pointed to new SDK folders with high priorities.
Please give me some more instructions.
Thanks.
THN
|
|
|
|
|
I did the same and I couldn't get it work in VC 6.
Then I have ported the project to Visual Studio .NET - and it started to work!
I even removed the call to InitCommonControls, and appropriate h and lib files - it still works.
------------------------
It's a Jeep thing...
You wouldn't understand.
|
|
|
|
|
GREAT! i've been searching for that for 6 months now... thanks!!
|
|
|
|
|
after exploring the same problem (DLL + visual styles) from my assembly source code I found the solution in several .h include files:
If you define ISOLATION_AWARE_ENABLED, a large number of API functions are defined different, e.g.
#define RegisterClassA IsolationAwareRegisterClassA
these new functions are all declared inline in the "winuser.inl" include file, they all check, if the style/manifest is created and activated. Then they call the nice named function "IsolationAwarePrivatezltEgCebCnDDeEff " which itself is defined as "IsolationAwarePrivatezltRgCebPnQQeRff".
This inline function finally does the following:
(1) check if "unicows.dll" is loaded
(2) try to get the proc address of the wanted API funtion in this DLL, e.g. RegisterClassA
(3) uses this function instead the original one
(4) if not found inside unicows, it get the function from the original DLL
quite ugly from Microsoft
So if you want to have the feature from any other compiler or programming language, you need to use all functions from unicow.
|
|
|
|
|
I'm using a tabcltrl on a dialog and the background color of the dialog do not match the background color of the tabctrl.
Do you have any idea to solve this?
Thanks!
|
|
|
|
|
i'm having the same problem...
|
|
|
|
|
hum.. this is very weird..
like:
if i had a edit box (list ctrl, etc) to a tab page, the background color is wrong. but if i had a static control, it displays the correct one (from the theme). so... if i put an edit box and an static, it also displays correctly...
to fix, put a static text with no text and visible off... it works but it shouldn't be this way...
does anyone has an answer, and fix?
|
|
|
|
|
|
Here is a nice little the function I made to wrap up the DLL loading and call, just call this function in your WM_INITDIALOG...
void EnableThemeDialogTexture(HWND hwndTabControl)
{
HINSTANCE hDll = LoadLibrary("uxtheme.dll");
if(hDll == NULL)
{
// the DLL won't be available on anything except Windows XP
//_ASSERT(0);
return;
}
ULONG (PASCAL *lpfnEnableTheme)(HWND, DWORD);
(FARPROC&)lpfnEnableTheme = GetProcAddress(hDll, "EnableThemeDialogTexture");
if(lpfnEnableTheme == NULL)
{
_ASSERT(0);
return;
}
// ETDT_ENABLETAB = 6
lpfnEnableTheme(hwndTabControl, 6);
FreeLibrary(hDll);
}
|
|
|
|
|
|
For me, the following helped:
Delete "SetDialogBkColor();" in yourApp::InitInstance().
|
|
|
|
|
|
I use ownerdraw controls in my dialog too... which I want to look different when running under XP (e.g. make them looks more XP like). Is there an easy way to achieve this (e.g. detect XP using the selected sheme on runtime), any additional hints, handy things to know?
Thx Moak
PS: see also this thread
|
|
|
|