Thread View: borland.public.cppbuilder.multimedia
2 messages
2 total messages
Started by Formentz
Mon, 14 May 2001 11:57
Video size
Author: Formentz
Date: Mon, 14 May 2001 11:57
Date: Mon, 14 May 2001 11:57
8 lines
1013 bytes
1013 bytes
Hi all,
how could I get the default width and height of a video, so I can resize it
mantaining the right ratio?
I am using standard TMediaPlayer and the Display is a TPanel.
TIA
Ciao
Formentz
Re: Video size
Author: Formentz
Date: Mon, 14 May 2001 12:55
Date: Mon, 14 May 2001 12:55
35 lines
1703 bytes
1703 bytes
Yeah!!
I got it!!
MCI_DGV_RECT_PARMS mdwp;
mciSendCommand(MediaPlayer->DeviceID, MCI_WHERE,
MCI_TEST | MCI_DGV_WHERE_DESTINATION,
(DWORD)&mdwp));
OriginalSize=mdwp.rc;
now to resize the video :
TRect r=Panel1->BoundsRect;
double cWdt=r.Right-r.Left,
cHgt=r.Bottom-r.Top,
sWdt=OriginalSize.Right-OriginalSize.Left,
sHgt=OriginalSize.Bottom-OriginalSize.Top;
TRect dest=Rect(0,0,cWdt,cWdt/sWdt*sHgt);
if(dest.Bottom>cHgt) dest=Rect(0,0,cHgt/sHgt*sWdt,cHgt);
MediaPlayer->DisplayRect=dest;
Ciao
Formentz
"Formentz" <francesco@leotron.com> ha scritto nel messaggio
news:3affc796_1@dnews...
> Hi all,
> how could I get the default width and height of a video, so I can resize
it
> mantaining the right ratio?
> I am using standard TMediaPlayer and the Display is a TPanel.
>
> TIA
> Ciao
> Formentz
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads