Problem when hiding menu/status bar/command prompt... (C++)

Hello,

For a custom skin I need to hide menu, side bar, status bar, osnap dialog and command prompt. I try to do it with the following code (run either after starting Rhino or in OnLoadPlugIn()), taken from How to hide menu, command, property view ... ? (MFC/Rhino5).

CRhinoAppAppearanceSettings settings = RhinoApp().AppSettings().AppearanceSettings();
settings.m_show_menu = false;      
settings.m_show_side_bar = false;
settings.m_show_statusbar = false;
settings.m_show_osnap_dialog = false;
settings.m_cmdprompt_position = CRhinoAppAppearanceSettings::command_prompt_hidden;
RhinoApp().AppSettings().SetAppearanceSettings(settings);

The problem is that this code sometimes works and sometimes not… Sometimes everything is properly hidden, but the next time I open Rhino and run it the command prompt + osnap options stay there, or the side bar is visible.
It’s difficult for me to properly reproduce the “bug” because I don’t find a consistent pattern. I only figured out that somehow the command prompt and the osnap options are the controls that more often stay visible when they shouldn’t.

Could someone try it (not once, but several times when opening different Rhino sessions) and see if the same happens, or how to address the issue?

Thank you,
Pablo

@JohnM - any ideas here?

Nothing off the top of my head, I would need to build a test plug-in and see if it can be reproduced.

Hi,

I fixed this by calling

RhinoApp().HideToolBars();
RhinoApp().HideControlBars();
RhinoApp().HideWindowBars(0x00000002); //HWB_MENU_BAR
RhinoApp().HideWindowBars(0x00000004); //HWB_STATUS_BAR

These methods are much more consistent, even a bit “too much” (HideControlBars hides everything regardless of the input). But this is fine for the moment, thanks.

Pablo