Source code of Windows XP (NT5)
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.

62 lines
1.9 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Wallpaper Tasks</TITLE>
  4. <STYLE TYPE="text/css">
  5. <!--
  6. BODY { background: red; }
  7. -->
  8. </STYLE>
  9. </HEAD>
  10. <SCRIPT LANGUAGE="JavaScript">
  11. function myLoad()
  12. {
  13. document.open();
  14. document.writeln ("<STYLE>BODY { background: green; }>");
  15. document.writeln ("</STYLE>");
  16. document.writeln ("<BODY>");
  17. document.writeln ("<OBJECT ID=\"MMCCtrl\" <");
  18. document.writeln (" CLASSID=\"CLSID:545AE700-50BF-11D1-9FE9-00600832DB4A\">");
  19. document.writeln (">");
  20. document.writeln ("</OBJECT>");
  21. document.writeln ("</BODY>");
  22. document.close();
  23. var task = MMCCtrl.GetFirstTask ("wallpaper");
  24. while (task != null) {
  25. var str = "";
  26. var display = task.DisplayObject;
  27. switch (display.DisplayObjectType) {
  28. default:
  29. alert ("bad DisplayObjectType! skipping...");
  30. break;
  31. case 1: // MMC_TASK_DISPLAY_TYPE_SYMBOL
  32. alert ("symbol: not implemented yet: skipping...");
  33. break;
  34. case 2: // MMC_TASK_DISPLAY_TYPE_VANILLA_GIF, // (GIF) index 0 is transparent
  35. case 3: // MMC_TASK_DISPLAY_TYPE_CHOCOLATE_GIF, // (GIF) index 1 is transparent
  36. case 4: // MMC_TASK_DISPLAY_TYPE_BITMAP // non-transparent raster
  37. str = "<P ALIGN=center><A HREF="
  38. + task.ActionURL + "><IMG SRC="
  39. + display.MouseOffBitmap
  40. + " style=\"filter: gray(enabled=true) invert(enabled=0)\""
  41. + " onmouseover=\"filters.gray.enabled = false;\""
  42. + " onmouseout =\"filters.gray.enabled = true;\""
  43. + ">" + task.Text + "</A>";
  44. break;
  45. }
  46. if (str != "")
  47. document.body.insertAdjacentHTML ("BeforeEnd", str);
  48. task = MMCCtrl.GetNextTask();
  49. }
  50. alert ("document.body.innerHTML:\n" + document.body.innerHTML);
  51. }
  52. window.onload = myLoad;
  53. </SCRIPT>
  54. </HTML>