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

UpdateStyles() protected method

protected UpdateStyles ( ) : void
return void
        protected void UpdateStyles() {
            if ( Created ) {
                REBARBANDINFO rbBand = new REBARBANDINFO();
                rbBand.cbSize = (uint)Marshal.SizeOf( rbBand );
                rbBand.fMask = (uint)win32.RBBIM_STYLE;
                rbBand.fStyle = (uint)Style;

                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 Styles.", ex ));
                    }

                }
            }
        }