#region Windows Message Definitions converted from
WinUser.h
public enum
WMDefs
{
WM_DRAWITEM
=0x002B,
WM_REFLECT
=0x2000,
WM_NOTIFY
=0x004e
}
#endregion
#region Header Notification Definitions
public enum
HDNDefs
{
HDN_FIRST
=-300,
HDN_ENDTRACKA
=(HDN_FIRST-7),
HDN_ENDTRACKW
=(HDN_FIRST-27),
}
#endregion
protected override
void WndProc(ref
Message m)
{
switch(m.Msg)
{
case (int)(WMDefs.WM_NOTIFY):
NMHDR
hdr=(NMHDR)m.GetLParam(typeof(NMHDR));
if(hdr.code==(int)HDNDefs.HDN_ENDTRACKA
|| hdr.code==(int)HDNDefs.HDN_ENDTRACKW)
AutoSizeLastColumn();
base.WndProc(ref
m);
break;
case
(int)(WMDefs.WM_REFLECT | WMDefs.WM_DRAWITEM):
ProcessDrawItem(ref
m);
break;
default:
base.WndProc
(ref m);
break;
}
}