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,
                                                            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));
        }
 protected override void DestroyWindowCore(HandleRef hwnd)
 {
     WinFunctions.DestroyWindow(hwnd.Handle);
 }