mirror of https://github.com/tongzx/nt5src
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
62 lines
1.9 KiB
<HTML>
|
|
|
|
<HEAD>
|
|
<TITLE>Wallpaper Tasks</TITLE>
|
|
<STYLE TYPE="text/css">
|
|
<!--
|
|
BODY { background: red; }
|
|
-->
|
|
</STYLE>
|
|
</HEAD>
|
|
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
function myLoad()
|
|
{
|
|
document.open();
|
|
document.writeln ("<STYLE>BODY { background: green; }>");
|
|
document.writeln ("</STYLE>");
|
|
|
|
document.writeln ("<BODY>");
|
|
|
|
document.writeln ("<OBJECT ID=\"MMCCtrl\" <");
|
|
document.writeln (" CLASSID=\"CLSID:545AE700-50BF-11D1-9FE9-00600832DB4A\">");
|
|
document.writeln (">");
|
|
document.writeln ("</OBJECT>");
|
|
|
|
document.writeln ("</BODY>");
|
|
|
|
document.close();
|
|
|
|
var task = MMCCtrl.GetFirstTask ("wallpaper");
|
|
while (task != null) {
|
|
var str = "";
|
|
var display = task.DisplayObject;
|
|
switch (display.DisplayObjectType) {
|
|
default:
|
|
alert ("bad DisplayObjectType! skipping...");
|
|
break;
|
|
case 1: // MMC_TASK_DISPLAY_TYPE_SYMBOL
|
|
alert ("symbol: not implemented yet: skipping...");
|
|
break;
|
|
case 2: // MMC_TASK_DISPLAY_TYPE_VANILLA_GIF, // (GIF) index 0 is transparent
|
|
case 3: // MMC_TASK_DISPLAY_TYPE_CHOCOLATE_GIF, // (GIF) index 1 is transparent
|
|
case 4: // MMC_TASK_DISPLAY_TYPE_BITMAP // non-transparent raster
|
|
str = "<P ALIGN=center><A HREF="
|
|
+ task.ActionURL + "><IMG SRC="
|
|
+ display.MouseOffBitmap
|
|
+ " style=\"filter: gray(enabled=true) invert(enabled=0)\""
|
|
+ " onmouseover=\"filters.gray.enabled = false;\""
|
|
+ " onmouseout =\"filters.gray.enabled = true;\""
|
|
+ ">" + task.Text + "</A>";
|
|
break;
|
|
}
|
|
if (str != "")
|
|
document.body.insertAdjacentHTML ("BeforeEnd", str);
|
|
|
|
task = MMCCtrl.GetNextTask();
|
|
}
|
|
alert ("document.body.innerHTML:\n" + document.body.innerHTML);
|
|
}
|
|
window.onload = myLoad;
|
|
</SCRIPT>
|
|
</HTML>
|