 |
|
 |
Thanks MK; this was helpful!
|
|
|
|
 |
|
 |
Has anyone tried this on Windows 7? I have a couple of controls that don't work right when I add the manifest file. Everything works fine on XP but not Windows 7.
Update... The common controls ver 6 on Windows 7 can cause problems if you render the graphics yourself, via the Draw() method. We had a ListCtrl where we rendered the gridlines based on a hardcoded font size and ended up with lines in the middle of our text. Also, our context menu calculation were wrong due to the listctrl header and font being a slightly different size. The fix is to dynamically calculate all offsets and font size based on the control and actual font being used. I am sure no one else is supporting an old product with hard coded values in thier rendering
This article was also very helpful:
Changing Row Height in an owner drawn Control[^]
modified on Thursday, January 28, 2010 4:31 PM
|
|
|
|
 |
|
 |
This can be done in Visual Studio(2010Beta, other editions not sure)
Project Property-> Manifest Tool -> Input and Output-> Generate Manifest From ManagedAssembly => Microsoft.Windows.Common-Controls
===
Still Learning
|
|
|
|
 |
|
 |
Works in VS2008.
Project Property-> Manifest Tool -> Input and Output
and put manifest.xml in Additional Manifest Files
|
|
|
|
 |
|
 |
I used manifest dependency through #pragma, but the performnace got reduced, is this expected? is there anyway we could improve performnace and have the look and feel we get through manifest?
|
|
|
|
 |
|
 |
Dear All,
In our application I tried with compiler directive
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
It works fine VS 2005 and later versions,
I need the solution for enabling the xp themes in application without manifest file in all Visual Stdio versions(Including VS 2003, 2004).
Please help me,
Eagerly waiting for reply
Thanks,
Basavaraj Bijjaragi
|
|
|
|
 |
|
 |
Dear Klutch Sir,
I need the solution for enabling the xp themes in application without manifest file, Is it posible ?
It must work for all versions of VS
Thanks,
Basavaraj.
|
|
|
|
 |
|
 |
Add this line to stdAfx.h
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
Vijay
|
|
|
|
 |
|
 |
It almost worked in Visual C++ version 4.0, but not entirely. When I tried to run it I got the following error messages (as well as many warning dialog boxes):
First-chance exception in xpTest.exe: 0xC0000005: Access Violation.
First-chance exception in xpTest.exe (NTDLL.DLL): 0xC0000005: Access Violation.
First-chance exception in xpTest.exe: 0xC0000005: Access Violation.
The program 'C:\DOCUMENTS AND SETTINGS\ERIC\MY DOCUMENTS\PROGRAMS\xpTest\Debug\xpTest.exe' has exited with code 0 (0x0).
So I removed manifest.xml and the InitCommonControls() line and tested to make sure nothing had gotten corrupted. Not only were things not corrupted, but they now had the XP look! Hooray!
Unfortunately, when I came back to it later it had reverted back to the windows 95 style. Worse yet class view was no longer working. Bummer. Anyone have any ideas how to make this work for VC4.0?
modified on Monday, May 12, 2008 11:32 AM
|
|
|
|
 |
|
 |
The instructions say Ctrl+R to insert new resource...then
Select ALL files...??? What is that?
After Ctrl+R I see Insert resource dialog with top node Accelerator selected by default.
Again what is "Select All Files"?
This is in VS 6.0
|
|
|
|
 |
|
 |
After CTRL+R import the manifest.xml to your project. Click import and select the file. And then it will request for the Resource Type, then u can enter as 24 and then ok. Now the resource in your project will get updated with the file. now you can change the resource id of this file as '1' and continue doing as mentioned in the article. It works!
Priya Sundar
|
|
|
|
 |
|
 |
Hello, I am trying to use XP styles using the directions described here, but it does not seem to work with my win32 app. The example code provided here uses MFC. I have noticed the following output when I try to run my program: 'BigPricer.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded. 'BigPricer.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded. 'BigPricer.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll', No symbols loaded. 'BigPricer.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded. The program '[3032] BigPricer.exe: Native' has exited with code 0 (0x0). It would seem that the app is loading two versions of the comctl32 dll. I am using Visual Studio 2005. Thanks, Samwise
|
|
|
|
 |
|
 |
I had similar trouble with Win32 projects, the resource was compiling to my exe file but had no effect on appearance. I did 3 things:
1. defined values for WINVER, _WIN32_WINNT, _WIN32_WINDOWS, _WIN32_IE
like you would for an MFC project
2. removed the inclusion and InitCommonControls statement
3. rebuilt the dialogue resources
I dunno which of those worked but now it shows XP style buttons, etc. The whole process is extremely flakey and poorly documented unless you're using MFC and Visual Studio.
|
|
|
|
 |
|
 |
Hello,
I'm trying to get back to the old Win9X style but I can't.
I've deleted InitCommonControls(),
i've deleted #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'\""),
I've set to yes or no the option of the embedded manifest in the project properties.
Nothing worked.
I'm stuck.
P.S.: I'm developping on Visual C++ 2005.
Thanks for your help
|
|
|
|
 |
|
 |
delete #pragma ....
REBUILD ALL !!!!!
youpii !!
|
|
|
|
 |
|
 |
InitCommonControls Function
--------------------------------------------------------------------------------
Registers and initializes the common control window classes. This function is obsolete. New applications should use the InitCommonControlsEx function.
Windows XP: If a manifest is used, InitCommonControlsEx is not required.
|
|
|
|
 |
|
 |
I tried not using the InitCommonControls function and it just worked for me (using VS 6, MFC app).
Thanks!
|
|
|
|
 |
|
 |
I did not expect it to be so easy
Thank you!
|
|
|
|
 |
|
 |
hi i am using this article in win32(dll)application i want to know how to use this article in win32 dll application for xp style theme.
plz help me
|
|
|
|
 |
|
 |
I've often used your article to get XP thened apps with VS 6.0 but now I'm trying with VC++ in VS 2005 and it does not work.
I even tried to import your very proyect, the one you include in this web, and I get this errors when I try to compile:
------ Build started: Project: XPStyles, Configuration: Debug Win32 ------
Linking...
CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Build log was saved at "file://c:\Documents and Settings\Rik\Mis documentos\Visual Studio 2005\Projects\XPStyles\Debug\BuildLog.htm"
XPStyles - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any ideas?
Best regards,
Ricardo.
|
|
|
|
 |
|
 |
Sorry:
If I compile with the "Release" build I get it compiled & linked. BUT when I run the App, controls are NOT WinXP themed (though I use WinXP Style for bottons & windows)
Do you know why could this be?
Regards,
Ricardo.
|
|
|
|
 |
|
 |
Thanks for bringing this up! I had no idea it was an issue till I tried it! There's a couple things going on here, I'll try to explain it as best as I can.
Visual Studio 2005 automaticlly creates and embeds a manifest file in your MFC or Win32 Project. You'll notice if you go to the project properties of the converted project you'll see Manifest Tool, open that up and select "Input and Output" if you change "Embed Manifest" to "No" you'll notice you no longer get the compile errors. However this is not the solution.
The first thing you'll want to do is remove the manifest.xml file from the project. Then remove the resource itself (open the RT_MANIFEST folder and delete the "1" resource)
Now add this code to the end of your stdafx.h file
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
And you should be stylin again!
Strangely enough it automaticlly does this if your project is unicode enabled. If you want to be really fancy you could add this code:
ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif
To give credit where credit is due, I pretty much found all the info here to make everything work: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=143306&SiteID=1[^].
Let me know if this works for you. I will try an update the article with this info as soon as I can verify it works for someone!
Thanks
Kluch
-- modified at 0:31 Friday 16th December, 2005
|
|
|
|
 |
|
 |
It made it!! YES!
Thank you VERY much for your quick, nice and accurate answer!
I'm looking forward to read your updated article!
Best regards and thanks again,
Ricardo.
|
|
|
|
 |
|
 |
Thanks a lot,
its work fine
|
|
|
|
 |
|
 |
I am using this for my ATL dll it does not work please help me. It is a COM ATL dll in C++. should I use Init CommControlsEx()
modified on Tuesday, July 21, 2009 6:17 AM
|
|
|
|
 |