PrabuKumar’s Blog

September 20, 2008

Playing Media File FULLSCREEN in CEPlayer.exe

Filed under: WinCE 6.0 — prabukumar @ 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++;
                 }
         }

}

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Blog at WordPress.com.