关于TMediaPlayer缩放,请您赐教

sprink1e 2002-08-21 12:00:25
想使用现成的VCL TMediaPlayer 实现一个附属功能,但是它本身并不提供缩放功能,
其中DisplayRect似乎可以用来控制显示区域,但是我是用后无任何效果,以下通过状
态栏返回TRect的Height,Width值;
其中 Heitht=bottom-top ;
Width=right-left ;

从返回值看,即使指定TRect的坐标,也不能改变Height width值,不知道为什么,请
高手赐教



//()())))))))))))))))))))))))))))))))))))))))))))))))) Test TRect Area
Form1->StatusBar1->Panels->Items[0]->Text= IntToStr
(Form1->MediaPlayer1->DisplayRect.Width());
Form1->StatusBar1->Panels->Items[1]->Text= IntToStr
(Form1->MediaPlayer1->DisplayRect.Height());
//()()()()))))))))))))))))))))))))))))))))))))))))))))))





//————————————————————————————————————
Form1->MediaPlayer1->DisplayRect.left/*=Form1->Panel1->Left+*/ =0;
Form1->MediaPlayer1->DisplayRect.top/*=Form1->Panel1->Top+*/ =0;
Form1->MediaPlayer1->DisplayRect.right/*=Form1->Panel1->Top+*/ =50;
Form1->MediaPlayer1->DisplayRect.bottom/*=Form1->Panel1->Left+*/ =75;



struct TRect : public RECT
{
TRect() {}
TRect(const TPoint& TL, const TPoint& BR) { left=TL.x; top=TL.y;
right=BR.x; bottom=BR.y; }
TRect(int l, int t, int r, int b) { left=l; top=t;
right=r; bottom=b; }
TRect(RECT& r)
{
left = r.left;
top = r.top;
right = r.right;
bottom = r.bottom;
}
int Width () const { return right - left; }
int Height() const { return bottom - top ; }
bool operator ==(const TRect& rc) const
{
return left == rc.left && top==rc.top &&
right == rc.right && bottom==rc.bottom;
}
bool operator !=(const TRect& rc) const
{ return !(rc==*this); }

__property LONG Left = { read=left, write=left };
__property LONG Top = { read=top, write=top };
__property LONG Right = { read=right, write=right };
__property LONG Bottom = { read=bottom, write=bottom };
};


---------------------------------------------------------
本站提示:请您注册自己的用户标识(id)并登录使用您的News软件
设置方法可见: http://www.webking.com.cn 之"注册及登录说明"
在线帮助: http://www.webking.com.cn/chat
----本附加信息仅针对未登录用户,注册并登录后将自行移去----
...全文
73 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧