admin 管理员组

文章数量: 887021


2023年12月22日发(作者:springboot代码结构)

c(ref m); } private void OnWmNcPaint(ref Message m) { rcWnd = new (); dowRect(, ref rcWnd); int intWidth = ; int intHeight = ; int width = ; int height = ; IntPtr hRgn = RectRgn(0, 0, width, height); if (hRgn != ) { IntPtr hDc = dowDC(); if (hDc != ) { IntPtr memDc = CompatibleDC(hDc); if (memDc != ) { IntPtr hBmp = CompatibleBitmap(hDc, width, height); if (hBmp != ) { IntPtr hObj = Object(memDc, hBmp); if (32() != 1) { IntPtr tmpRgn = RectRgn(0, 0, 0, 0); eRgn(tmpRgn, , , _COPY); Rgn(tmpRgn, -, -); eRgn(hRgn, hRgn, tmpRgn, _AND); Object(tmpRgn); } using (Graphics g = c(memDc)) { RenderNCArea(g, width, height, true); } ClipRgn(hDc, hRgn); eClipRect(hDc, m_rcClient.X, m_rcClient.Y, m_, m_); (hDc, 0, 0, , , memDc, 0, 0, 0x00CC0020/*SRCCOPY*/ ); Object(memDc, hObj); Object(hBmp); } DC(memDc); } DC(hDc); } IntPtr hTmp = RectRgn(m_, m_, m_, m_); if (hTmp != ) { eRgn(hRgn, hRgn, hTmp, _AND); Rgn(hRgn, , ); Object(hTmp); Message msg = new Message();

Message msg = new Message(); = ; = ; = hRgn; c(ref msg); } Object(hRgn); } = ; } private void RenderNCArea(Graphics g, int width, int height, bool bDrawBorder) { Rectangle rc = new Rectangle(0, 0, width, height); using (Brush brush = new SolidBrush(lor)) { ctangle(brush, 0, 0, width, height); } if (bDrawBorder) { DrawBorders(rc, g); } } private void DrawBorders(Rectangle rc, Graphics g) { rder(g, rc, Color, ); }}public class NativeMethods{ internal const int WS_EX_CLIENTEDGE = 512 /*0x0200*/; internal const int WS_EX_WINDOWEDGE = 0x0100; internal const int WM_PAINT = 15; // 0x000f internal const int WM_NCPAINT = 133; // 0x0085 internal const int RGN_AND = 1; internal const int RGN_OR = 2; internal const int RGN_XOR = 3; internal const int RGN_DIFF = 4; internal const int RGN_COPY = 5; [StructLayout(tial)] public struct RECT { public int left; public int top; public int right; public int bottom; public RECT(Rectangle rect) { = ; = ; = ; = ; }

} public RECT(int left, int top, int right, int bottom) { = bottom; = left; = right; = top; } public static RECT FromXYWH(int x, int y, int width, int height) { return new RECT(x, y, x + width, y + height); } public int Width { get { return - ; } } public int Height { get { return - ; } } public override /*Object*/ string ToString() { return ( "Left = ", , " Top ", , " Right = ", , " Bottom = ", ); } public static implicit operator Rectangle(RECT rect) { return RB(, , , ); } } [DllImport("")] internal static extern bool GetWindowRect(IntPtr hwnd, ref RECT lpRect); [DllImport("", CharSet = , ExactSpelling = true, CallingConvention = )] internal static extern IntPtr CreateRectRgn(int x1, int y1, int x2, int y2); [DllImport("", CharSet = , ExactSpelling = true, CallingConvention = )] internal static extern IntPtr GetWindowDC(IntPtr hWnd); [DllImport("", CharSet = , ExactSpelling = true, CallingConvention = )] internal static extern IntPtr CreateCompatibleDC(IntPtr hDC); [DllImport("", CharSet = , ExactSpelling = true, CallingConvention = )] internal static extern IntPtr CreateCompatibleBitmap(IntPtr hDC, int width, int height); [DllImport("gdi32", CharSet = , ExactSpelling = true)]


本文标签: 结构 作者 代码