TMediaPlayer & Fullscreen

TMediaPlayer & Fullscreen

Post by Mr. an0nymou » Tue, 27 Jul 1999 04:00:00



I know this question has been asked before but i need away to display movies
using tmediaplayer at full screen, with out setting a display(ie.
mediaplayer->display = form3;) is their anyway at all to do this?!
 
 
 

TMediaPlayer & Fullscreen

Post by Damon Chandle » Wed, 28 Jul 1999 04:00:00


Hi Mr. an0nymous,

Quote:> I know this question has been asked before but i need away to display movies
> using tmediaplayer at full screen, with out setting a display(ie.
> mediaplayer->display = form3;) is their anyway at all to do this?!

You can use the OnPostClick event handler in which you manipulate the display
window using the GetWindowLong() / SetWindowLong() combination, along with the
SetWindowPos() function.  Here's an example...

void __fastcall TForm1::MediaPlayer1PostClick(TObject *Sender,
    TMPBtnType Button)
{
    if (Button == btPlay)
    {
        // Get a handle to the MediaPlayer display window
        // may be "AVIWnd32" for WinNT
        HDisplayWindow = FindWindow("AVIWnd", NULL);

        // remove the border and caption
        LONG dwStyle = GetWindowLong(HDisplayWindow, GWL_STYLE);
        SetWindowLong(HDisplayWindow, GWL_STYLE, dwStyle &
                      ~WS_CAPTION & ~WS_THICKFRAME);

        // resize to fullscreen
        SetWindowPos(HDisplayWindow, HWND_TOPMOST, 0, 0,
                     Screen->Width, Screen->Height, NULL);
    }

Quote:}

Hope this helps!

--------------------------------------
Damon Chandler

http://bcbcaq.freeservers.com
Answers to <Commonly Asked Questions>

 
 
 

TMediaPlayer & Fullscreen

Post by Mr. an0nymou » Wed, 28 Jul 1999 04:00:00


Will this work on any/most computer, and will it work when playing mpeg
files?


Quote:> Hi Mr. an0nymous,
> > I know this question has been asked before but i need away to display
movies
> > using tmediaplayer at full screen, with out setting a display(ie.
> > mediaplayer->display = form3;) is their anyway at all to do this?!

> You can use the OnPostClick event handler in which you manipulate the
display
> window using the GetWindowLong() / SetWindowLong() combination, along with
the
> SetWindowPos() function.  Here's an example...

> void __fastcall TForm1::MediaPlayer1PostClick(TObject *Sender,
>     TMPBtnType Button)
> {
>     if (Button == btPlay)
>     {
> // Get a handle to the MediaPlayer display window
>         // may be "AVIWnd32" for WinNT
>     HDisplayWindow = FindWindow("AVIWnd", NULL);

>         // remove the border and caption
> LONG dwStyle = GetWindowLong(HDisplayWindow, GWL_STYLE);
>     SetWindowLong(HDisplayWindow, GWL_STYLE, dwStyle &
>       ~WS_CAPTION & ~WS_THICKFRAME);

>         // resize to fullscreen
>         SetWindowPos(HDisplayWindow, HWND_TOPMOST, 0, 0,
>          Screen->Width, Screen->Height, NULL);
>     }
> }

> Hope this helps!

> --------------------------------------
> Damon Chandler

> http://bcbcaq.freeservers.com
> Answers to <Commonly Asked Questions>

 
 
 

1. TMediaPlayer & AVI Problems

I'm using TMediaPlayer to play a number of .AVI files. My TMediaPlayer has
Visible  = false and I'm playing them with the Play() method. The problem is
that once the video clip has completed, it disappears from the screen. If I
have my TMediaPlayer component visible and click the Play button (rather
than programatically Play()'ing via the method), the last frame of the .avi
stays on the screen. Also, the Display is set to a TPanel component on my
form.

It seems like the Play() method is forcing a screen refresh which wipes out
the last frame of the .avi, which doesn't happen when using the Play button.

Any ideas? I've tried a number of approaches (i.e., messing with the wait,
length, EndPos properties ) with no success. Any help would be __greatly__
appreciated.

2. 3D VW Beetle.

3. TMediaPlayer & MPEG

4. Anim Maps/Seq Help

5. TMediaplayer & .asx files

6. viewing a *.gp4 file

7. GlutGameMode & fullscreen

8. Rayrecursion llimit =24?

9. Mesa & fullscreen

10. Multi-texturing & fullscreen

11. fullscreen & windowed

12. OpenGl & FullScreen

13. Fullscreen app & DirectX 8.1