How to know if the Windows UI is in darkmode in C++?

Hi,

I am trying to read if the Windows Rhino UI is set to darkmode with the C++ API.

I did not find anything in RhinoApp().AppSettings().AppearanceSettings() and also did not find a way to read the advanced setting Rhino.Options.Advanced.DarkMode.

How do I know if the user has set Rhino to darkmode?

Thanks for the help,
Daniel

Hi @Daniel_kronos,

https://developer.rhino3d.com/api/rhinocommon/rhino.runtime.hostutils/runningindarkmode

Helpful?

– Dale

Hi @dale,

Thanks you for your reply.

I have also seen this in RhinoCommon. But to my understanding I can not call RhinoCommon code from c++ and I dont have any C# code in my projekt.

Ist there a way in the c++ API?

Regards,
Daniel

Hi @Daniel_kronos,

Yes, use CRhinoUiPaintColorSettings::RunningInDarkMode.

const CRhinoUiPaintColorSettings& settings = RhinoApp().AppSettings().UiPaintColorSettings();
bool bDarkMode = settings.RunningInDarkMode();

– Dale

After updating the SDK, this worked.

Thank you for the quick help!