AutoPatientInfoRecorder/src/AntdUI/Lib/Vanara/DwmApi.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

// THIS FILE IS PART OF Vanara PROJECT
// THE Vanara PROJECT IS AN OPENSOURCE LIBRARY LICENSED UNDER THE MIT License.
// COPYRIGHT (C) dahall. ALL RIGHTS RESERVED.
// GITHUB: https://github.com/dahall/Vanara

using System.Runtime.InteropServices;

namespace Vanara.PInvoke
{
    /// <summary>Encapsulates classes exposed by DWNAPI.DLL</summary>
    public static partial class DwmApi
    {
        /// <summary>Extends the window frame into the client area.</summary>
        /// <param name="hWnd">The handle to the window in which the frame will be extended into the client area.</param>
        /// <param name="pMarInset">
        /// A pointer to a MARGINS structure that describes the margins to use when extending the frame into the client area.
        /// </param>
        /// <returns>If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</returns>
        [DllImport("dwmapi.dll", SetLastError = false, ExactSpelling = true)]
        [System.Security.SecurityCritical]
        [PInvokeData("dwmapi.h")]
        public static extern void DwmExtendFrameIntoClientArea(HWND hWnd, in MARGINS pMarInset);

        /// <summary>Returned by the GetThemeMargins function to define the margins of windows that have visual styles applied.</summary>
        [StructLayout(LayoutKind.Sequential)]
        [PInvokeData("dwmapi.h")]
        public struct MARGINS
        {
            /// <summary>Width of the left border that retains its size.</summary>
            public int cxLeftWidth;

            /// <summary>Width of the right border that retains its size.</summary>
            public int cxRightWidth;

            /// <summary>Height of the top border that retains its size.</summary>
            public int cyTopHeight;

            /// <summary>Height of the bottom border that retains its size.</summary>
            public int cyBottomHeight;

            /// <summary>Retrieves a <see cref="MARGINS"/> instance with all values set to 0.</summary>
            public static readonly MARGINS Empty = new MARGINS(0);

            /// <summary>Retrieves a <see cref="MARGINS"/> instance with all values set to -1.</summary>
            public static readonly MARGINS Infinite = new MARGINS(-1);

            /// <summary>Initializes a new instance of the <see cref="MARGINS"/> struct.</summary>
            /// <param name="left">The left border value.</param>
            /// <param name="right">The right border value.</param>
            /// <param name="top">The top border value.</param>
            /// <param name="bottom">The bottom border value.</param>
            public MARGINS(int left, int right, int top, int bottom)
            {
                cxLeftWidth = left;
                cxRightWidth = right;
                cyTopHeight = top;
                cyBottomHeight = bottom;
            }

            /// <summary>Initializes a new instance of the <see cref="MARGINS"/> struct.</summary>
后面还有 57 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。