Browsing to a Specific Page

Browsing to a Specific Page

Windows Media Center exposes a way for third-party applications to launch Windows Media Center and browse to a specific set of pages. This process works regardless of whether the Windows Media Center user interface (UI) is currently running. This process also brings the Windows Media Center UI to the foreground.

This process is the only supported mechanism of browsing to the Windows Media Center UI from a third-party stand-alone application, and was first made available in Microsoft Windows XP Media Center Edition 2004.

To browse to the Windows Media Center UI, the third-party application must do the following:

  1. Call the Win32 FindWindow API, passing "Media Center Tray Applet" for the class name and NULL for the window name.
  2. If the FindWindow API returns NULL, run %windir%\ehome\ehTray.exe with the /nav:X command-line parameter, where X is the WPARAM value from the table below.
  3. Call the Win32 RegisterWindowMessage API passing "Media Center Navigate To Page", and then save the result.
  4. Call the Win32 SendMessageTimeout API passing the window returned in step 2, the message registered in step 3, and the appropriate values for the WPARAM and LPARAM parameters from the tables below.

    WPARAM values for browsing:

    Windows Media Center pageWPARAM value
    Windows Media Center Start MenuWPARAM = 0
    Live TVWPARAM = 1
    TV GuideWPARAM = 2
    My TVWPARAM = 3
    Recorded TVWPARAM = 4
    My MusicWPARAM = 5
    My PhotosWPARAM = 6
    Schedule RecordingsWPARAM = 7
    My VideosWPARAM = 8
    RadioWPARAM = 9
    Online Spotlight (only for Update Rollup 2 for Windows XP Media Center Edition 2005 and later) WPARAM = 12
    Extensibility application (only for Update Rollup 2 for Windows XP Media Center Edition 2005 and later) WPARAM = 13

    LPARAM values for browsing:

    Startup stateLPARAM value
    Start Windows Media Center in the last used state (full screen or windowed)LPARAM = 0
    Start Windows Media Center full screenLPARAM = 1

    New values may be added in future versions of Windows Media Center.

  5. If the SendMessage API returns a non-zero value, the browse failed.

See Also

Show:
© 2016 Microsoft