* UIListBox, UIImageListBox: 防止闪烁
This commit is contained in:
parent
1408316ed6
commit
dc91d5f879
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -362,6 +362,21 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void WndProc(ref Message m)
|
||||||
|
{
|
||||||
|
if (IsDisposed || Disposing) return;
|
||||||
|
if (IsHandleCreated)
|
||||||
|
{
|
||||||
|
if (m.Msg == Win32.User.WM_ERASEBKGND)
|
||||||
|
{
|
||||||
|
m.Result = IntPtr.Zero;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
base.WndProc(ref m);
|
||||||
|
}
|
||||||
|
|
||||||
public ImageListBox()
|
public ImageListBox()
|
||||||
{
|
{
|
||||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
@ -523,6 +523,12 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
ItemsInsert?.Invoke(this, EventArgs.Empty);
|
ItemsInsert?.Invoke(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m.Msg == Win32.User.WM_ERASEBKGND)
|
||||||
|
{
|
||||||
|
m.Result = IntPtr.Zero;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
base.WndProc(ref m);
|
base.WndProc(ref m);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user