コード例 #1
0
        public Size GetPartSize(GraphicsContext dc, int partId, int stateId, PartSizingMode mode, Rect rect)
        {
            AssertPartDefined(partId, stateId);
            int hr = NativeMethods.GetThemePartSize(Handle, dc.Handle, partId, stateId, ref rect, mode, out var size);

            if (hr != 0)
            {
                Marshal.ThrowExceptionForHR(hr);
            }

            return(size);
        }
コード例 #2
0
 public static extern int GetThemePartSize(IntPtr hTheme, IntPtr hDC, int partId, int stateId, [In] ref Rect rect, PartSizingMode sizeMode, out Size size);