/// <summary> /// When our handle is removed we give the hdr_contrl a little /// help by telling him now is a good time to release its handle. /// From now on, we do not have a hdr_contrl instance active /// so we set hdr_contrl to null and don't use it until reset. /// </summary> /// <param name="e">Event</param> protected override void OnHandleDestroyed( System.EventArgs e ) { // free and then delete the ListViewFilterHeader control if( _headerControl != null ) { _headerControl.ReleaseHandle(); _headerControl = null; } // do this AFTER we tell the ListViewFilterHeader to release base.OnHandleDestroyed( e ); }
/// <summary> /// When the handle changes we need to recreate the Filter /// Header instance. The previous (if any) header instance /// was tied to a handle that is now gone. /// </summary> /// <param name="e">Event</param> protected override void OnHandleCreated( System.EventArgs e ) { base.OnHandleCreated( e ); // now that we have a handle, create the HeaderControl instance _headerControl = new FilteredListViewHeader( this, _showFilters, _sortColumn, _sortOrderAscending ); SendMessage( this.Handle, W32_LVM.LVM_SETSELECTEDCOLUMN, _sortColumn, 0 ); SendMessage( this.Handle, W32_LVM.LVM_UPDATE, 0, 0 ); }
private RECT col_rectng = new RECT(); // HDITEM instance #endregion Fields #region Constructors /// <summary> /// Constructor this must be given the header instance for access /// to the Handle property so that messages can be sent to it. /// </summary> /// <param name="header">HeaderControl</param> public ColumnSizeInfoCollection( FilteredListViewHeader header ) { col_hdrctl = header; }
private HDITEM col_hditem = new HDITEM(); // HDITEM instance #endregion Fields #region Constructors /// <summary> /// Constructor this must be given the header instance for access /// to the Handle property so that messages can be sent to it. /// </summary> /// <param name="header">HeaderControl</param> public ColumnNamesCollection( FilteredListViewHeader header ) { col_hdrctl = header; }
private HDITEM col_hditem = new HDITEM(); // HDITEM instance #endregion Fields #region Constructors /// <summary> /// Constructor this must be given the header instance for access /// to the Handle property so that messages can be sent to it. /// </summary> /// <param name="header">HeaderControl</param> public ColumnDataTypeCollection( FilteredListViewHeader header ) { col_hdrctl = header; }
private HDITEM col_hditem = new HDITEM(); // HDITEM instance #endregion Fields #region Constructors /// <summary> /// Constructor this must be given the header instance for access /// to the Handle property so that messages can be sent to it. /// </summary> /// <param name="header">HeaderControl</param> public ColumnAlignmentCollection( FilteredListViewHeader header ) { col_hdrctl = header; }