|
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
|
|
|
|
|
How could I do this in C#? I don't have VS.NET, but maybe there's a way simply by editing the resource files?
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchUsingWindowsXPVisualStylesWithControlsOnWindowsForms.asp
|
|
|
|
|
The Code works just fine.
But after I've had the new XP look i wondered that the flat common controls scrollbars looked like odd old scrollbars. Is it possible that the new comctl doesn't support them or about that?
Disabling them enables themed scroll bars as in every application (with or without theme support).
BTW: I didn't used MFC in my project.
--------------------------
xplo.re Administrator
http://www.xplo-re.de/
|
|
|
|
|
Just what I've been looking for. Thanks a bunch!
swinefeaster
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
It's great! in a MFC project the "insert manifest" step seems to be enough
BUT.....
I'm using multiple keyboard layouts and some non-english characters do not appear in edit boxes (in my program and in the test app too), they show up or as a box or the letter without accents and stuff. What can I do???
|
|
|
|
|
Thanks .. it is very useful. Could you please explain the following steps
1. choose "Custom", input "24" (without quotes) as resource type
Why 24 why not 26 or 34
2. Change resource ID to 1. Why?
Thanks
|
|
|
|
|
In "winuser.rh" of the latest version of Platform SDK, include the following lines:
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define RT_MANIFEST 24
Is this make sense?
Alan Wen
|
|
|
|
|
Yes!
Thanks Alan...
-Mona
|
|
|
|
|
don't support chinese (GB2312)
|
|
|
|
|
If I try this on a standard MFC application, the toolbar doesn't seem to be repainted properly. Anyone know how to solve this?
|
|
|
|