How can I change the MainComponent in mainwindow?

HI all,

I am searching for this for hours but nothing found..

Basically, how can I get a reference or a pointer for the mainWindow when I am inside the MainContentComponent ?

Thanks in advance

 

George

Ask for the topLevelComponent: https://www.juce.com/doc/classComponent#ae0f9f275a8a0d09acbf789c0aaa86314

You can check via dynamic_cast if it is a MainWindow. See the docs about the possible outcomes...

HTH

Also, Component::findParentComponentOfClass

Thanks guys..