Thanks and regards,
Amit
>Hi All,
>I have window which has a "Launch window" menu. Once user will click
>this menu new child window gets launched.
>Now I want to block the parent window. Same as the DoModal() function
>do in case of dialog box.
****
Then why not use a modal dialog? Wouldn't that be much simpler?
****
>User should not do any thing on parent window until child window gets
>destroyed.
****
GetParent()->EnableWindow(FALSE);
would be a good start.
****
>Please help me to solve this issue.
>Thanks in advance.
>
>Thanks and regards,
>Amit
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Thanks for your feedback.
I can't use the dialog box in my case as i have to do some drawing
operations on client area of window.
Also I tried the GetParent()->EnableWindow(FALSE); but i didn't worked
for me.
That doesn't preclude the use of a CDialog. You can simply draw on the
dialog, but you can also write your own window class (that draws what
you want, and put it in the dialog, as a child window). I'd go for
that.
Goran.
This is a case of solving the wrong problem in the wrong way! Frankly, it would never
have occurred to me to use a CWind-derived child window when a CDialog is so much simpler!
No matter what you want to do for drawing, a modal CDialog with a child control that does
your drawing would be a bettr approach. Otherwise, you are trying to re-create something,
and will probably end up with an unsupportable kludge.
joe
On Tue, 15 Jun 2010 22:14:15 -0700 (PDT), "amitm...@gmail.com" <amitm...@gmail.com>
wrote:
>Hi Joseph,