Prev: Support for IPv6
Next: TRUE vs true or FALSE vs false
From: amitmane82 on 15 Jun 2010 09:34 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. User should not do any thing on parent window until child window gets destroyed. Please help me to solve this issue. Thanks in advance. Thanks and regards, Amit
From: Joseph M. Newcomer on 15 Jun 2010 10:06 See below... On Tue, 15 Jun 2010 06:34:01 -0700 (PDT), "amitmane82(a)gmail.com" <amitmane82(a)gmail.com> wrote: >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: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: amitmane82 on 16 Jun 2010 01:14 Hi Joseph, 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.
From: Goran on 16 Jun 2010 07:40 On Jun 16, 7:14 am, "amitman...(a)gmail.com" <amitman...(a)gmail.com> wrote: > I can't use the dialog box in my case as i have to do some drawing > operations on client area of window. 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.
From: Joseph M. Newcomer on 16 Jun 2010 10:05 That doesn't even make sense. The correct approach would be to use a modal dialog, put a CStatic in it, and move your OnPaint to the CStatic class! 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), "amitmane82(a)gmail.com" <amitmane82(a)gmail.com> wrote: >Hi Joseph, > >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. Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
|
Pages: 1 Prev: Support for IPv6 Next: TRUE vs true or FALSE vs false |