Changing the Display Mode for WebTV for Windows

[This is preliminary documentation and subject to change.]

WebTV for Windows has two display modes, television and desktop. Television mode displays WebTV for Windows full-screen. Desktop mode displays WebTV for Windows as an application in a window.

Once your application has connected to WebTV for Windows, as described in Getting a Pointer to WebTV for Windows, you can call ITVViewer::SetTVMode to change the display mode from desktop to television or from television to desktop. The other display-related method WebTV for Windows provides is ITVViewer::IsTVMode, which returns a Boolean value indicating whether WebTV for Windows is currently displaying full-screen.

The following example combines these methods to implement an event handler for a button that toggles WebTV for Windows between full-screen and desktop display.

void CTVXSamp::ClickToggleModeButton()
{
  /* Check whether WebTV for Windows currently displays full-screen */
  if (TVX->IsTVMode())
  {
    /* If so, change to desktop mode */
    TVX->SetTVMode(false);
  }else{
    /* Otherwise, set WebTV for Windows to full-screen mode */
    TVX->SetTVMode(true);
  }
}