Your WindowsDemo will choke if you quit the demo app while the DialogWindow is still open
Simple fix:
Add a private member variable:
DialogWindow* dialogWindow;
In the constructor:
WindowsDemo() : dialogWindow (nullptr)
{
and in the Destructor:
if (dialogWindow != nullptr)
{
if (dialogWindow->isCurrentlyModal(true))
{
dialogWindow->exitModalState (0);
delete dialogWindow;
}
}
Rail
