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

UpdateCaption() protected method

protected UpdateCaption ( ) : void
return void
        protected void UpdateCaption() {
            if ( Created ) {
                REBARBANDINFO rbBand = new REBARBANDINFO();
                rbBand.cbSize = (uint)Marshal.SizeOf( rbBand );
                rbBand.fMask = (uint)win32.RBBIM_TEXT;
                rbBand.lpText = _caption;
                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 Caption.", ex ));
                    }

                }
            }
        }