cadencii.windows.forms.RebarBand.UpdateChildByHandle C# (CSharp) Method

UpdateChildByHandle() private method

private UpdateChildByHandle ( IntPtr handle ) : void
handle System.IntPtr
return void
        private void UpdateChildByHandle( IntPtr handle ){
            if ( Created ) {
                REBARBANDINFO rbBand = new REBARBANDINFO();
                rbBand.cbSize = (uint)Marshal.SizeOf( rbBand );
                rbBand.fMask = (uint)win32.RBBIM_CHILD;
                if ( handle.Equals( IntPtr.Zero ) ) {
                    rbBand.hwndChild = IntPtr.Zero;
                } else {
                    rbBand.hwndChild = handle;
                }

                if ( win32.SendMessage( _bands.Rebar.RebarHwnd, (int)win32.RB_SETBANDINFOA, BandIndex, ref rbBand ) == 0 ) {
                    int LastErr = Marshal.GetHRForLastWin32Error();
                    try {
                        Marshal.ThrowExceptionForHR( LastErr );
                    } catch ( Exception ex ) {
                        Console.WriteLine( LastErr + " " + ex.Message );
                        if ( _throwExceptions ) throw (new Exception( "Error Updating Child.", ex ));
                    }

                }
                UpdateMinimums();
            }
        }