ReleaseDC() приватный Метод

private ReleaseDC ( IntPtr hWnd, IntPtr hDC ) : int
hWnd IntPtr
hDC IntPtr
Результат int
        /// <summary>
        /// Destroys the render context provider instance.
        /// </summary>
        protected override void DisposeUnmanagedResources()
        {
            //	Release the device context.
            Win32.ReleaseDC(windowHandle, this.DeviceContextHandle);

            //	Destroy the window.
            Win32.DestroyWindow(windowHandle);

            //	Call the base, which will delete the render context handle.
            base.DisposeUnmanagedResources();
        }
Пример #2
0
        /// <summary>
        /// Destroys the render context provider instance.
        /// </summary>
        public override void Destroy()
        {
            //	Release the device context.
            Win32.ReleaseDC(windowHandle, DeviceContextHandle);

            //	Destroy the window.
            Win32.DestroyWindow(windowHandle);

            //	Call the base, which will delete the render context handle.
            base.Destroy();
        }
        /// <summary>
        /// Destroys the render context provider instance.
        /// </summary>
        protected override void DisposeUnmanagedResources()
        {
            //	Release the device context.
            Win32.ReleaseDC(windowHandle, this.DeviceContextHandle);

            //	Destroy the window.
            Win32.DestroyWindow(windowHandle);

            // If we have a render context, destroy it.
            if (this.RenderContextHandle != IntPtr.Zero)
            {
                Win32.wglDeleteContext(this.RenderContextHandle);
                this.RenderContextHandle = IntPtr.Zero;
            }
        }