Question about how to place a dialog into a view. 
Author Message
 Question about how to place a dialog into a view.

In the header of your formview class, there will be a declaration of an enum
named IDD.  Change its value to the value of your dialog resource.  That will
make the formview use your dialog instead of the original default one.
(Normally, one would just modify the original dialog template to their needs.
But since you already made another dialog template, just change the IDD in the
header.)
Make sure your existing dialog template has the following style settings:
        WS_CHILD=On  (select "Child" in the drop list)
        WS_BORDER=Off (uncheck the boxes for these)
        WS_VISIBLE=Off
        WS_CAPTION=Off

As for making the formview change from one dialog to another, that's a bit more
complex.  What I would suggest is to make a formview class for each dialog
template, but show only one of them at a time.  When user clicks an icon in the
left pane, have the splitter switch formviews in the right pane.



Sat, 05 Jun 2004 14:17:13 GMT  
 Question about how to place a dialog into a view.
you said normally, one would just modify the original dialog template , so
is it use ShowWindow() to hide and show control in the template to do it.



Quote:
> In the header of your formview class, there will be a declaration of an
enum
> named IDD.  Change its value to the value of your dialog resource.  That
will
> make the formview use your dialog instead of the original default one.
> (Normally, one would just modify the original dialog template to their
needs.
> But since you already made another dialog template, just change the IDD in
the
> header.)
> Make sure your existing dialog template has the following style settings:
> WS_CHILD=On  (select "Child" in the drop list)
> WS_BORDER=Off (uncheck the boxes for these)
> WS_VISIBLE=Off
> WS_CAPTION=Off

> As for making the formview change from one dialog to another, that's a bit
more
> complex.  What I would suggest is to make a formview class for each dialog
> template, but show only one of them at a time.  When user clicks an icon
in the
> left pane, have the splitter switch formviews in the right pane.



Sat, 05 Jun 2004 14:34:28 GMT  
 Question about how to place a dialog into a view.
No.  What I meant was that the AppWizard (or ClassWizard) generated a dialog for
you, and it is normal to just modify that one instead of making a new one.  But
it isn't as common to switch views in the right pane, so there really isn't a
"normally" in that case.  I still suggest my original idea of making multiple
formviews and swapping them in the splitter pane.


Sat, 05 Jun 2004 14:50:29 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Placing a view class in a dialog

2. Placing a view class in a dialog

3. Placing a view class in a dialog

4. Placing a view class in a dialog

5. Howto place some views on a dialog with splitter functionality

6. How to place a dialog on the dialog

7. Placing icons in a view

8. In-place editing of text in a view window

9. How to place a menu on a view.

10. Place button in a View?

11. Placing window inside view area

12. Q: Placing ActiveX controls onto SDI View

 

 
Powered by phpBB® Forum Software