How to: Install and Register a Custom Today Screen Item
To install a custom Today item, you need to copy the DLL file for the Today component and register the component. For information about writing a custom DLL, see Writing a Custom Today Screen Item.
To register a "My Today Item" component implemented in a file called Sample.dll
- Create a new key called "My Today Item" in HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items.
- Under HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items\My Today Item, add the values listed in the following table.
Value name Type Data Comments Type DWORD 4 All custom items use a Type of 4. Enabled DWORD 1 0 or 1; indicates whether the item is displayed on the Today screen. If Enabled=0, the user can cause the Today item to appear by selecting the box in the list of items on the Items tab of the Today application in Settings. Options DWORD 1 0 or 1; indicates whether the item has an Options dialog. DLL String "\Windows\Sample.DLL" The full path and name of the DLL. Selectability DWORD 1 0, 1, or 2; 0 indicates it is not selectable, 1 indicates the item is selectable and the shell will handle Up/Down messages, 2 indicates the item is selectable and the plug-in handles the Up/Down messages
You would most likely use a .cab file created by CabWiz to install your Today items, and the following example shows how the registry information would look in the .inf file:
[Reg.All]
HKLM,Software\Microsoft\Today\Items\My Today Item,Type,0x00010001,4
HKLM,Software\Microsoft\Today\Items\My Today Item,Enabled,0x00010001,1
HKLM,Software\Microsoft\Today\Items\My Today Item,Options,0x00010001,1
HKLM,Software\Microsoft\Today\Items\My Today Item,Selectability,0x00010001,2
HKLM,Software\Microsoft\Today\Items\My Today Item,DLL,0x00000000,"\Windows\Sample.DLL"
For an example of how to create a Today screen item, refer to the Win32 sample MemWatcher.
See Also
Today Screen Reference | Writing a Custom Today Screen Item | Today Screen Plug-in Registry Settings (PPC Only)
Send Feedback on this topic to the authors