12-14-2005 02:10 AM
12-14-2005 05:51 AM
05-22-2006 06:58 AM - edited 05-22-2006 06:58 AM
Hi,
I have the same problem with the media player control. It resizes automatically as soon as media is shown. I also need to have the control at a fixed size.
The Windows Media Player SDK says (Object Model Migration Guide):
"Automatic sizing is the default behavior. To override automatic sizing, set the height and width properties in the <OBJECT> tag or in script.Automatic sizing is the default behavior. To override automatic sizing, set the height and width properties in the <OBJECT> tag or in script."
I have tried to set the height of ActiveX container by SetCtrlAttribute(panel, wmpObj,ATTR_HEIGHT, height) but it doesn't work out. I read in a newsgroup that it works well with a popular c++ enviroment to stop the autofit function by setting the container size.
I have also tried to set the shrinkToFit property, but it doesn't work either.
This is what the WMP SDK says:
"The shrinkToFit attribute specifies or retrieves a value indicating whether the video will shrink to the width and height defined for the Video control. ... Remarks If no width or height is specified, this attribute is ignored. "
I assume that the shrinkToFit attribute is ignored, because SetCtrlAttribute doesn't set the container size in correct way.
Moreover I have found some postings in the LV thread about this problem:
http://forums.ni.com/ni/board/message?board.id=170&message.id=154231&query.id=69396#M154231
Is this a general implementation error of CVI/LV or is it possible to fix the size of the control/container?
How can this be done?
Message Edited by MaWie on 05-22-2006 06:59 AM