Quote Originally Posted by Gyannea
Well, it should prevent switching back to the parent window (the action taken to create the modal dialog). For example, the good old message box. When you get one of those, you can't go back to the parent window and try to play with another control, you have to press the 'ok' button to continue. You can go to another window, however.

What I was trying to do was a quick and dirty way to convert my modeless dialog box to a modal (such as a message box). But it seems I have to call the DialogBox function instead of the CreateDialog() function. So Windows does something extra to get that behavior, I just don't know what.

Brian

PS: I've only been programming Windows for about 2 years, so I know nothing about the older versions!
As i told you.how to create a Modeless dialog .and at a single time you can check that no more then one instance running of the application.from upper code you can do this.no need to make system modal or anything else
Second you can take a bool variable .and check if you completed your all work then only set this value 1 and call DestroyWindow.
other wise just return
and keep Set Focus on our first dialog
even on parent click set focus on child if it exist
anything else you want to know