When I build some add-ins for the management console using C++, the add-ins
made by me show a Win2000 interface while the rest of the add-ins made by MS
are using XP themes.
What am I missing?
Cheers 18 2251
"David Lowndes" <da****@example.invalid> wrote in message
news:25********************************@4ax.com... When I build some add-ins for the management console using C++, the add-ins made by me show a Win2000 interface while the rest of the add-ins made by MS are using XP themes.
What am I missing?
Have a look at:
http://msdn.microsoft.com/library/de.../xptheming.asp
Thanks a lot.
It's funny that XP was released in 2001, and Visual Studio 2003 in 2003 :)
Am I correct to say that ATL (shipped with Vstudio 2003 as well) simply does
not work with theming?
>Am I correct to say that ATL (shipped with Vstudio 2003 as well) simply does not work with theming?
I don't see the connection. What has ATL to do with XP themes?
One of the limitations imposed by VS2003 (that wasn't in VS2002) is
that only Unicode builds get a manifest - so non-Unicode builds won't
appear themed. Is that perhaps the situation you're hitting?
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
"David Lowndes" <da****@example.invalid> wrote in message
news:5l********************************@4ax.com... Am I correct to say that ATL (shipped with Vstudio 2003 as well) simply does not work with theming? I don't see the connection. What has ATL to do with XP themes?
I Know that ATL is not WTL but ATL has a lot of DialogImpl tools and VC
allows you to edit dialogs by using the resource editor.
There is a XPTHeme.cpp file, but I'm still puzzled why MS did not support
that out of the box or I'm simply missing some hidden feature?
What I did:
1) #include "commctrl.h"
2) #define ISOLATION_AWARE_ENABLED 1 (!! if you leave out the 1, it will not
compile!)3) #define MANIFEST_RESOURCE_ID 2
In the rc file
MANIFEST_RESOURCE_ID RT_MANIFEST "myDll.dll.manifest"(manifest contents not
shown here in this post)
One of the limitations imposed by VS2003 (that wasn't in VS2002) is that only Unicode builds get a manifest - so non-Unicode builds won't appear themed. Is that perhaps the situation you're hitting?
No, I stopped compiling for Win98 and ANSI compatible apps already 5 years
ago.
Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq
>What I did: 1) #include "commctrl.h" 2) #define ISOLATION_AWARE_ENABLED 1 (!! if you leave out the 1, it will not compile!)3) #define MANIFEST_RESOURCE_ID 2 In the rc file MANIFEST_RESOURCE_ID RT_MANIFEST "myDll.dll.manifest"(manifest contents not shown here in this post)
Other than compiling with the definition you mention, ensuring the
definition is visible for the appropriate include files, and ensuring
that your DLL really does have the manifest resource (open the DLL in
VS to be sure), I'm not aware that you have to do anything else to get
themes to work (though I've never tried with an MMC snap-in)
The following says pretty much the same: http://msdn.microsoft.com/library/en...frame=true#mmc
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
It's not enough to add the manifest in your resource's textinclude, but
you need to add it to your resource.h file as well, if it's not in
there.
>It's not enough to add the manifest in your resource's textinclude, but you need to add it to your resource.h file as well, if it's not in there.
Huh?
Please explain what you mean.
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
"David Lowndes" <da****@example.invalid> wrote in message
news:l8********************************@4ax.com... What I did: 1) #include "commctrl.h" 2) #define ISOLATION_AWARE_ENABLED 1 (!! if you leave out the 1, it will not compile!)3) #define MANIFEST_RESOURCE_ID 2 In the rc file MANIFEST_RESOURCE_ID RT_MANIFEST "myDll.dll.manifest"(manifest contents not shown here in this post) Other than compiling with the definition you mention, ensuring the definition is visible for the appropriate include files, and ensuring that your DLL really does have the manifest resource (open the DLL in VS to be sure), I'm not aware that you have to do anything else to get themes to work (though I've never tried with an MMC snap-in)
Sure I did!
thanks however for the hint.
The following says pretty much the same:
http://msdn.microsoft.com/library/en...frame=true#mmc
Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq
"David Lowndes" <da****@example.invalid> wrote in message
news:l8********************************@4ax.com... What I did: 1) #include "commctrl.h" 2) #define ISOLATION_AWARE_ENABLED 1 (!! if you leave out the 1, it will not compile!)3) #define MANIFEST_RESOURCE_ID 2 In the rc file MANIFEST_RESOURCE_ID RT_MANIFEST "myDll.dll.manifest"(manifest contents not shown here in this post) Other than compiling with the definition you mention, ensuring the definition is visible for the appropriate include files, and ensuring that your DLL really does have the manifest resource (open the DLL in VS to be sure), I'm not aware that you have to do anything else to get themes to work (though I've never tried with an MMC snap-in)
The following says pretty much the same:
http://msdn.microsoft.com/library/en...frame=true#mmc
Indeed.
And such as docs suggest. MFC with C++.NET can by design handle themes if
you only add the resource stuff and the flags.
And ATL does not. If somebody can confirm me this, I simply know the next
step.
(Before someone says that ATL is not graphical such as MFC or WTL, I must
slightly disagree, ATL supports MMC snapins).
Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq
For everybody's knowledge.
If you use ATL, no support for XP Theming is available. (I can't state such
for MFC b.t.w)
Use this http://www.codeproject.com/w2k/themewrapper.asp
The wrapper is needed after applying the resource manifest to your
executable or DLL
(see http://msdn.microsoft.com/library/en...frame=true#mmc)
"David Lowndes" <da****@example.invalid> wrote in message
news:l8********************************@4ax.com... What I did: 1) #include "commctrl.h" 2) #define ISOLATION_AWARE_ENABLED 1 (!! if you leave out the 1, it will not compile!)3) #define MANIFEST_RESOURCE_ID 2 In the rc file MANIFEST_RESOURCE_ID RT_MANIFEST "myDll.dll.manifest"(manifest contents not shown here in this post)
Other than compiling with the definition you mention, ensuring the definition is visible for the appropriate include files, and ensuring that your DLL really does have the manifest resource (open the DLL in VS to be sure), I'm not aware that you have to do anything else to get themes to work (though I've never tried with an MMC snap-in)
The following says pretty much the same:
http://msdn.microsoft.com/library/en...frame=true#mmc
Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq
>If you use ATL, no support for XP Theming is available.
I can't see how you conclude something like that (other than the fact
that it's apparently not working in your circumstance). Use this http://www.codeproject.com/w2k/themewrapper.asp
What relevance has that article with ATL? It's title says it's for
owner drawn controls? Do you use an owner drawn control in your ATL
based MMC snap-in?
Dave
"David Lowndes" <da****@example.invalid> wrote in message
news:4l********************************@4ax.com... If you use ATL, no support for XP Theming is available. I can't see how you conclude something like that (other than the fact that it's apparently not working in your circumstance).
Use this http://www.codeproject.com/w2k/themewrapper.asp
What relevance has that article with ATL?
Why ask about relevance. If you know a better group, please tell me.
It's title says it's for owner drawn controls? Do you use an owner drawn control in your ATL
The fact is, that non-owner drawn controls in ATL wont have XP styles.
Another fact is that developers in C# for instance, without a lot of
modification, can support styles and I've red the same about MFC.
ATL is left over. MS should make a clear point about their ATL support like
"ATL development has been frozen since 2000".
Now I'm not 100% sure whether or not I can support themes using the current
code or not.
based MMC snap-in?
Everything that I meet during development is ATL related.
If I do MFC, I would post it in MFC.
Dave
I mean:
3 TEXTINCLUDE
BEGIN
"CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST
"".\\myapp.exe.manifest""\r\n"
"\0"
END
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ".\myapp.exe.manifest"
in .rc file is not enough to enable visual styles. it also needs
#define IDR_MANIFEST 1
in resource.h
I know for a fact you can get XP themes to work in an atl dll. I have a
BHO built using ATL that has themes enabled in all of its dialog boxes.
If the host app supports linking in the commctrl dll via the isloation
aware method, then your atl dll should too..
Here is what I did.
1. added
/D ISOLATION_AWARE_ENABLED
to the command line args in the project properties. This is so it is
top level
2. added the standard manifest for common control v6 as a resource type
RT_MANIFEST and changed the id to 2.
3. in resource.h define IDR_MANIFEST to be 2
worked for me
"Egbert Nierop (MVP for IIS)" <eg***********@nospam.invalid> wrote in
message news:uz*************@TK2MSFTNGP15.phx.gbl... "David Lowndes" <da****@example.invalid> wrote in message news:4l********************************@4ax.com... >If you use ATL, no support for XP Theming is available.
I can't see how you conclude something like that (other than the fact that it's apparently not working in your circumstance).
Use this http://www.codeproject.com/w2k/themewrapper.asp
Solution:
It has to be defined in resource.h and not in stdafx.h
For some, this might be obvious if the MSDN mentions this, but the MSDN does
only say:
Define a manifest resource ID of 2.
#define MANIFEST_RESOURCE_ID 2 Solution:had to be done in resource.h and not
in stdafx.h.Now it works!
Couple of months ago, I have realized that my application doesn't
support visual styles, even though I have added it into my .rc file.
Then I compared the project's .rc and resource.h files with another
project's ones (written with WTL), which supports visual styles, and I
have seen that IDR_MANIFEST is not defined in former one. This is why I
told you that it's not enough to have manifest in your .rc but you also
need to #define it in your resource.h.
I am not sure why, but, for example, having TYPELIB in .rc file is also
insufficient to embed type library in COM dll, if it's not defined in
resource.h.
May be this is not related to resource IDs, but with resource count.
Because I have defined my manifest resource id 241, and it worked as
well.
Ismail
"Ismail Pazarbasi" <pa*******@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com... Couple of months ago, I have realized that my application doesn't support visual styles, even though I have added it into my .rc file. Then I compared the project's .rc and resource.h files with another project's ones (written with WTL), which supports visual styles, and I have seen that IDR_MANIFEST is not defined in former one. This is why I told you that it's not enough to have manifest in your .rc but you also need to #define it in your resource.h.
I am not sure why, but, for example, having TYPELIB in .rc file is also insufficient to embed type library in COM dll, if it's not defined in resource.h.
May be this is not related to resource IDs, but with resource count. Because I have defined my manifest resource id 241, and it worked as well.
I can explain. If you don't define the correct resource_id, the typelibrary
won't be found by Windows by using FindResourceEx(..) or LoadMenu(..)
LoadTypeLib ...etc. A resource id is usedin those parameters.
The C++ compiler does not warn you if you forgot to define a resource id. I
found by opening the DLL in resource edit mode, that the manifest was having
an ID of 0.
in my resource.h:
#define IDR_MYTYPELIB 1111
in my .rc
1 TYPELIB "navigation.tlb"
this works fine. I am not sure whether this is "the correct" way, I
have seen this example on KB. What I don't understand here is the
relationship between IDR_MYTYPELIB and the typelib resource in .rc.
IDR_MYTYPELIB is not used in .rc. Same applies to manifest. I have
changed my manifest id to 241 in .h, it works again, but not used that
name/id in .rc. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tim Marshall |
last post by:
I would swear that when I developed in A97, I could change the back
colour of a form.
However, in Windows XP, on both A97 and A2003, there no longer is a
property showing in the format tab for...
|
by: Sol |
last post by:
Hi Guys,
I'm looking for some advice / guidelines on using Themes with an application
I am working on. The application needs to allow people to customize the
appearance utilizing what I would...
|
by: lew26 |
last post by:
I have one page on my site that i do not want to have themes, or stylesheet themes applied to it. How do i disable both. I already know how to disable themes. But how do i disable stylesheetThemes?
...
|
by: Clint Chapman |
last post by:
When I look at the source html generated from my asp, the links for
the css in my theme are duplicated to include files in the _vti_cnf.
<link...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |