[StructLayout(LayoutKind.Sequential)]
struct BP_PAINTPARAMS : IDisposable
{
private int cbSize;
public BPPF Flags;
private IntPtr prcExclude;
private IntPtr pBlendFunction;
public BP_PAINTPARAMS(BPPF flags)
{
cbSize = Marshal.SizeOf(typeof(BufferedPaintParams));
Flags = flags;
prcExclude = pBlendFunction = IntPtr.Zero;
}
public Rectangle Exclude
{
get { return (Rectangle)Marshal.PtrToStructure(prcExclude, typeof(RECT)); }
set
{
if (prcExclude == IntPtr.Zero)
prcExclude = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(RECT)));
Marshal.StructureToPtr(value, prcExclude, false);
}
}
public BlendFunction BlendFunction
{
get { return (BlendFunction)Marshal.PtrToStructure(pBlendFunction, typeof(BlendFunction)); }
set
{
if (pBlendFunction == IntPtr.Zero)
pBlendFunction = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(BlendFunction)));
Marshal.StructureToPtr(value, pBlendFunction, false);
}
}
public void Dispose()
{
if (prcExclude != IntPtr.Zero) Marshal.FreeHGlobal(prcExclude);
if (pBlendFunction != IntPtr.Zero) Marshal.FreeHGlobal(pBlendFunction);
}
}
Structure BP_PAINTPARAMS
Public TODO
End Structure
None.