Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


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...

avmedia/source/win/window.cxx:
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()
    Dim tableau()
    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 ?

Greetz

Fernand



_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.