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