]>
Commit | Line | Data |
---|---|---|
1 | Microsoft Windows XP Support from wxWidgets | |
2 | ------------------------------------------- | |
3 | ||
4 | Windows XP introduces the themes (called "visual styles" in the Microsoft | |
5 | documentation) in Windows world. As wxWidgets uses the standard Windows | |
6 | controls for most of its classes, it can take advantage of it without | |
7 | (almost) any effort from your part. The only thing you need to do if you | |
8 | want your program to honour the visual style setting of Windows XP is to | |
9 | add the manifest file to your program (this is not at all specific to | |
10 | wxWidgets programs but is required for all Windows applications). | |
11 | ||
12 | wxWidgets now includes manifest resources in wx.rc, so it should be enough to | |
13 | include "wx/msw/wx.rc" in your application's resource file and you get | |
14 | XP look automatically. Notice that MSVC 2005 and later embed manifest in the | |
15 | executables it produces and wxWidgets doesn't use its own manifest when using | |
16 | this compiler. And if you don't want to use wxWidgets manifest with another | |
17 | compiler you may define wxUSE_NO_MANIFEST as 1 prior to including wx/msw/wx.rc. | |
18 | ||
19 | ||
20 | Finally, if all else fails you may always use a manifest manually. For this you | |
21 | need to create your own manifest file and put it in a file called | |
22 | "yourapp.exe.manifest" in the same directory where "yourapp.exe" resides. | |
23 | Alternatively, you can include the manifest in your applications resource | |
24 | section. Please see the MSDN documentation at | |
25 | ||
26 | http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175 | |
27 | ||
28 | for more details. | |
29 | ||
30 | Here is the example manifest which you can put into controls.exe.manifest | |
31 | file to test theme support using the controls sample: | |
32 | ||
33 | --- cut here --- | |
34 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
35 | <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | |
36 | <assemblyIdentity | |
37 | version="0.64.1.0" | |
38 | processorArchitecture="x86" | |
39 | name="Controls" | |
40 | type="win32" | |
41 | /> | |
42 | <description>Controls: wxWidgets sample application</description> | |
43 | <dependency> | |
44 | <dependentAssembly> | |
45 | <assemblyIdentity | |
46 | type="win32" | |
47 | name="Microsoft.Windows.Common-Controls" | |
48 | version="6.0.0.0" | |
49 | processorArchitecture="X86" | |
50 | publicKeyToken="6595b64144ccf1df" | |
51 | language="*" | |
52 | /> | |
53 | </dependentAssembly> | |
54 | </dependency> | |
55 | </assembly> | |
56 | --- cut here --- |