Playing Video in a Dialog
sos at pmgroup.be
Mon Apr 28 10:29:20 PDT 2014
On 28/04/2014 18:07, Michael Stahl wrote:
> On 17/04/14 11:23, Fernand Vanrie wrote:
>> On The French user site i found usefull code to play video on Windows
>> using the API and Basic.
>> The code opens a MediaWindow and play any video
>> The player has a undocumented method "CreatePlayerWindow" who needs
>> arguments (a empty array do crash LO)
>> Do someone knows how to use this method and how Video can been played in
>> a Dialog ?
> hi Fernand,
> let's see...
>> bool Window::create( const uno::Sequence< uno::Any >& rArguments )
>> IVideoWindow* pVideoWindow = const_cast< IVideoWindow* >( mrPlayer.getVideoWindow() );
>> WNDCLASS* mpWndClass = lcl_getWndClass();
>> if( !mnFrameWnd && pVideoWindow && mpWndClass )
>> awt::Rectangle aRect;
>> sal_IntPtr nWnd;
>> rArguments[ 0 ] >>= nWnd;
>> rArguments[ 1 ] >>= aRect;
>> mnParentWnd = static_cast<int>(nWnd);
> so on Windows, parameters are a HWND of the parent and a rectangle...
> probably the parameters are undocumented for a reason, very
> system-dependent and subject to change without notice. also i have no
> idea how you can get a window's HWND from BASIC code.
Michael thakns for the hint
on the ooForum i found this code:
Dim arg(0) As Object
Dim oWindow As Object
moSM = CreateObject("com.sun.star.ServiceManager")
moDesk = moSM2.CreateInstance("com.sun.star.frame.Desktop")
oWindow = moDesk.ActiveFrame.GetContainerWindow()
tableau = Array()
' the 1st param is an empty array, the 2nd is an integer = 1 (may
be OS dependant ?)
mHwndOOo = oWindow.getWindowHandle(tableau, 1)
but how to make this work in a dialog ?
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LibreOffice