PrabuKumar's WinCE Blog

September 20, 2008

Playing Media File FULLSCREEN in CEPlayer.exe

Filed under: WinCE 6.0 — Prabu Kumar @ 1:36 am
Tags: , ,

Normally in CEPlayer.exe for playing the video in full screen mode you need to select the FULLSCREEN option from the VIEW menu.

If you are developing an application on Windows CE from which you want to play any of the media file in full screen mode then here is the simple code to do it.

#define ID_VIEW_FULLSCREEN              40016

if(CreateProcess(_T(“\\windows\\ceplayer.exe”),_T(“\\windows\\test.wmv”), NULL,
NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, &ProcessInfo))

{

    // Wait until the player comes to the foreground window

       Sleep(1000);
       hWnd = GetForegroundWindow();
       if (hWnd == NULL)
       {
               DWORD error = GetLastError();
               RETAILMSG(1,(_T(“Get HWnd Failed Error = %d”),error));
        }
        else
        {
                if(i < 5)
                {
                          SendMessage(hWnd,WM_COMMAND,(WPARAM)ID_VIEW_FULLSCREEN,(LPARAM)0);

                           i++;
                 }
         }

}

1 Comment »

  1. […] Playing Media File FULLSCREEN in CEPlayer.exe September 2008 […]

    Pingback by 2010 in review « PrabuKumar’s Blog — January 31, 2011 @ 4:49 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.