winxp.txt 2.2 KB

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