Esempio n. 1
0
        protected override HandleRef BuildWindowCore(HandleRef hwndParent)
        {
            // Create the child window that will host the
            // mpv player.
            var playerHostPtr = WinFunctions.CreateWindowEx(0,
                                                            "static",
                                                            "",
                                                            WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN,
                                                            0,
                                                            0,
                                                            100,
                                                            100,
                                                            hwndParent.Handle,
                                                            (IntPtr)HOST_ID,
                                                            IntPtr.Zero,
                                                            0);

            // Set the mpv parent.
            var playerHostPtrLong = playerHostPtr.ToInt64();

            mpv.SetPropertyLong("wid", playerHostPtrLong);

            return(new HandleRef(this, playerHostPtr));
        }
Esempio n. 2
0
 protected override void DestroyWindowCore(HandleRef hwnd)
 {
     WinFunctions.DestroyWindow(hwnd.Handle);
 }