tags:

views:

57

answers:

1

Is there a way to make a dialog (CDialog) not descendant of the main frame?

If I don't specify a parent window at creation time the parent window is the main application window. I have tried to use SetOwner and SetParent with a NULL parameter but didn't work.

So is there any way to make a dialog not child of the main window or any other window that ultimately is a child of the main window??

+1  A: 

Every window is a child of another window. You can't make a window which doesn't have a Parent. Best you can do is to set the parent to DesktopWindow. You can get desktop window through GetDesktopWindow().

Aamir