private int scUpDown_SubClassedWndProc( ref Message m )
{
switch (m.Msg)
{
case Win32.WM_PAINT:
{
//------------------------
// redraw
IntPtr hDC = Win32.GetWindowDC( _scUpDown.Handle );
Graphics g = Graphics.FromHdc( hDC );
DrawIcons( g );
g.Dispose();
Win32.ReleaseDC( _scUpDown.Handle, hDC );
//------------------------
// return 0 (processed)
m.Result = IntPtr.Zero;
//------------------------
// validate current rect
var rect = new Rectangle();
Win32.GetClientRect( _scUpDown.Handle, ref rect );
Win32.ValidateRect( _scUpDown.Handle, ref rect );
//------------------------
}
return 1;
}
return 0;
}