Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

235 lines
7.6 KiB

  1. Theme Authoring Kit - 7/26/00
  2. -----------------------------
  3. The Theme Authoring Kit (TAK) is an informal (internal use only) collection
  4. of tools to help theme authors build new "visual styles" for Whistler.
  5. TAK consists of the following:
  6. 1. themesel.exe (theme testing program - see below)
  7. 2. packthem.exe (packages theme files into a .mstheme DLL)
  8. 3. tools needed for running packtheme.exe:
  9. - rc.exe (resource compiler)
  10. - link.exe (linker; used to build dll)
  11. - rcdll.exe (used by rc.exe)
  12. - cvtres.exe (used by link.exe)
  13. - mspdb60.dll (used by link.exe)
  14. 4. Sample theme Directories:
  15. - Business
  16. - BusSolid
  17. - BusDev
  18. 5. Informal documentation:
  19. - schema.txt (explains format/use of "TmSchema.h" file)
  20. - themes.txt (explains format/use of .ini files for themes)
  21. - tak.txt (this file)
  22. - skeming.ppt (a powerpoint intro to themes)
  23. 6. misc files:
  24. - TmSchema.h (schema file)
  25. - SchemaDef.h (schema helper file)
  26. - uxtheme.h (public api for theme-aware controls)
  27. - uxthemep.h (internal-only api for theme selection UI)
  28. Manually Switching Themes:
  29. --------------------------
  30. Until the real theme switching UI is ready, you can turn themes ON/OFF
  31. (and switch themes) by manually editing the registry:
  32. To turn the business "visual style" ON:
  33. a. shut down explorer (Start | Shut down | hold CTRL+ALT+Shift and click on the cancel button)
  34. b. run: regedit
  35. c. navigate to: HKEY_CURRENT_USER\software\microsoft\windows\currentversion
  36. d. add KEY: ThemeManager
  37. e. add string value to ThemeManager key:
  38. string: ThemeActive
  39. value: 1
  40. f. add string value to ThemeManager key:
  41. string: DllName
  42. value: %windir%\resources\0409\themes\business\business.mstheme
  43. g. close "regedit"
  44. h. run: explorer
  45. i. verfiy that taskbar has a new start button, smaller text, etc.
  46. The file "themeon.reg" automates the above steps. You can run in using "start themeon.reg"
  47. To turn the business "visual style" OFF:
  48. a. shut down explorer (Start | Shut down | hold CTRL+ALT+Shift and click on the cancel button)
  49. b. shut down any other programs running (this is a temp. requirement)
  50. c. run: regedit
  51. d. navigate to: HKEY_CURRENT_USER\software\microsoft\windows\currentversion\ThemeManager
  52. e. change the value of the "ThemeActive" string to "0"
  53. f. close "regedit"
  54. g. run: explorer
  55. h. verfiy that taskbar and start button have returned to normal
  56. The file "themeoff.reg" automates the above steps. You can run in using "start themeoff.reg"
  57. To switch to a different "visual style":
  58. a. shut down explorer (Start | Shut down | hold CTRL+ALT+Shift and click on the cancel button)
  59. b. shut down any other programs running (this is a temp. requirement)
  60. c. run: regedit
  61. d. navigate to: HKEY_CURRENT_USER\software\microsoft\windows\currentversion\ThemeManager
  62. e. change the value of the "DllName" string to be the full path of the .mstheme file
  63. to be loaded
  64. f. change the value of the "ThemeActive" string to "1"
  65. g. close "regedit"
  66. h. run: explorer
  67. i. verfiy that taskbar and start button reflect the new theme
  68. ThemeSel Program:
  69. -----------------
  70. themesel.exe is a program designed to test themes (and the theming
  71. subsystem). It consists of a tabbed set of pages in a window.
  72. The main page is labelled "general" and is used to browse and select
  73. available themes (packaged as .mstheme dll's) and theme directories.
  74. It can also control special theme loading options (target only 1 app
  75. or 1 window, etc).
  76. When a theme directory is selected and applied by themesel, it
  77. will call the "packthem" utility to package the theme into a .mstheme
  78. DLL and then load the DLL as the current theme.
  79. The other tabbed pages are used to view the effects of the theme on
  80. various controls.
  81. ThemeSel and Hooking Services:
  82. ------------------------------
  83. The loading of system-wide hooks needed by themeing is done in
  84. explorer.exe. When explorer starts up, it will install the hooks
  85. if there is a theme active for the current user. ThemeSel will ask
  86. explorer to install the hooks when themesel is started and there isn't
  87. a theme active. When ThemeSel exits, it will ask explorer to remove the
  88. hooks if no theme is currently active.
  89. Packaging Themes:
  90. -----------------
  91. 1. a theme directory consists of:
  92. - a "themes.ini" file
  93. - one or more "classdata" files
  94. - all of the image files used by the theme
  95. - all of the NTL files used by the theme
  96. 2. the only image files supported in a classdata file are ".bmp" files
  97. 3. the following files can be converted using "imagecon.exe" to .bmp files:
  98. - .jpeg
  99. - .gif
  100. - .png
  101. - .tif
  102. - .emf
  103. - .wmf
  104. - .ico
  105. 4. the contents of a theme directory can be packaged into a DLL file by
  106. using the "packthem.exe" tool. this tool is run automatically by themesel
  107. when you select a theme directory.
  108. 5. "packthem" requires that the following tool support files are available in the
  109. same directory (as packthem.exe) or in your PATH:
  110. - link.exe
  111. - rc.exe
  112. - cvtres.exe
  113. - rcdll.dll
  114. - mspdb60.dll
  115. 6. the above support files can be copied from: \\rfernand7\public\tak
  116. 7. packthem takes a directory name as its cmd line argument and processes the "themes.ini" file
  117. in that directory. For example:
  118. packthem subcool
  119. 8. As the "themes.ini" file is processed:
  120. - the file is parsed for syntax errors
  121. - the "themes.ini" file is added to the package being built (as a TEXT resource)
  122. - recognized properties from the [documentation] section are written to a
  123. package string table
  124. - each color scheme name, display name, and tooltip string are written to
  125. package string tables
  126. - each size name, display name, and tooltip string are written to package
  127. string tables
  128. - each specified classdata file is processed
  129. 9. As each "classdata" file is processed:
  130. - the file is parsed for syntax errors
  131. - the classdata file is added to the package being built (as a TEXT resource)
  132. - any .bmp "ImageFile" references within the .ini file
  133. are added to the package (as a resource)
  134. - any "NtlFile" references within the .ini file
  135. are added to the package (as a resource)
  136. - any font specifications are written to a package string table
  137. 9. if no errors are encountered during the above steps, a DLL is produced (the base name
  138. will be the ending name of the directory; the extension will be ".mstheme").
  139. Unpackaging Themes:
  140. -------------------
  141. Sometimes you will only have the .mstheme file and want to make an adjustment. There is a
  142. "-u" switch for "packthem.exe" that will let you do this:
  143. packthem -u -a professional.mstheme
  144. The above cmd will unpack all of the bitmaps and .ini files from professional.mstheme into the
  145. current directory. The "-a" tells packthem to write the text files as ANSI (default in UNICODE).