ent1ty wrote:Yes, it happens at that line. Debuger: Unhandled exception at 0x00406434 in game.exe: 0xC0000005: Access violation reading location 0x00000000.
Could it be the problem that IGUICheckBox* set_dyns= 0; is global but set_dyns= env->addCheckBox() is inside of a function and isChecked in another function? [/code]
OK, so I fixed this. But I have one more question: defaultly, when I click X in the top right corner, the window is destroyed. How can i change this to only set the window invisible?
You can catch EGET_ELEMENT_CLOSED for the window, call setVisible(false) on the window and then return true in the event-receiver to prevent the event from being passed on.
I already solved it with window->getCloseButton()->setVisible(false); and then making my own "close"(make invisible) button. But that is also a good idea, thanks.