Adding a DialogWindow to desktop question


#1

is possible to istantiate a dialog window and add it to the desktop without making it visible on the taskbar ? i’ve tried delaying the constructor addToDesktop bool, then calling it directly but i always reach an assert in TopLevelWindow if i try to not make the flags with ComponentPeer::windowAppearsOnTaskbar.

/* It's not recommended to change the desktop window flags directly for a TopLevelWindow, because this class needs to make sure its layout corresponds with settings like whether it's got a native title bar or not. */ jassert (windowStyleFlags == getDesktopWindowStyleFlags());

is that possible ?


#2

nobody ? :frowning:


#3

Yes - you can override its TopLevelWindow::getDesktopWindowStyleFlags() method if you need custom flags. Sorry, didn’t notice this post before.

I’ll add a comment about this next to the assertion, to make it more obvious…


#4

ah ok, that assert is not mandatory so… i thought if i subclassed that and changed the default window flags i’ll obtain strange behaviours… thanx for clarify


#5