Hello!
I have defined a function in my main form and I would like to access it in the code of the panels, but to do that I need to access the Form object.
I've tried something like
MainForm* form = static_cast <MainForm*> (GetControl(L"IDC_FORM"));
and also
SceneManager* pSceneManager = SceneManager::GetInstance();
Scene* scene = pSceneManager->GetCurrentScene();
Form* form = scene->GetForm();
MainForm* form = static_cast <MainForm*> (form);
both these compile, and both crash without an error message when I try to do
form->functionIWantToCall();
Any idea how I'm supposed to do this?