use a dialog button to open a doc/view menu (In tree view) 
Author Message
 use a dialog button to open a doc/view menu (In tree view)

Hi all..

I'm new to MFC and doc/view. Heck I'm new to C++ design. But I'm currently trying
to start a project with a dialog box. When the user press a button, it would open
a tree view menu in doc/view format (After process a bunch of data using methods
in the doc class). I can create doc/view tree menu with VC++ AppWizard and I also
can create a dialog box with AppWizard. But how do I create a dialog box with a
button that would open a tree menu with doc/view form??? I was thinking of
creating two separate projects (one with a dialog box and another with the tree
menu) and attempt to connect the two together (which sounds like a messy job).
But I believe that there should be a way in VC++ and MFC for me to add a piece of
code that would create a document/view tree view menu once a button is pressed.
Thank you for the assistance in advance. (I was even thinking of putting the
dialog box and the tree view in two projects in a space but I figure that it
won't be a good way of doing it).

Peter



Fri, 12 Sep 2003 08:08:13 GMT  
 use a dialog button to open a doc/view menu (In tree view)
Hi all..

I'm new to MFC and doc/view. Heck I'm new to C++ design. But I'm currently trying
to start a project with a dialog box. When the user press a button, it would open
a tree view menu in doc/view format (After process a bunch of data using methods
in the doc class). I can create doc/view tree menu with VC++ AppWizard and I also
can create a dialog box with AppWizard. But how do I create a dialog box with a
button that would open a tree menu with doc/view form??? I was thinking of
creating two separate projects (one with a dialog box and another with the tree
menu) and attempt to connect the two together (which sounds like a messy job).
But I believe that there should be a way in VC++ and MFC for me to add a piece of
code that would create a document/view tree view menu once a button is pressed.
Thank you for the assistance in advance. (I was even thinking of putting the
dialog box and the tree view in two projects in a space but I figure that it
won't be a good way of doing it).

Peter



Fri, 12 Sep 2003 08:08:17 GMT  
 use a dialog button to open a doc/view menu (In tree view)

If I understand your wishes, it seems like you simply need to call the CWinApp's
OpenDocumentFile method with the desired filename from the appropriate method in
the dialog, in response to the button press.  This would cause your document to
open in its own frame window, displaying your view.

  marsco3.vcf
< 1K Download


Fri, 12 Sep 2003 09:15:19 GMT  
 use a dialog button to open a doc/view menu (In tree view)
I am not sure what you mean by "doc/view format".

You say "When the user press a button, it would open a tree view menu".
Could the menu be in the same dialog or would it be a separate dialog? I
assume a separate dialog, since you say you are considering a separate
project for it.

I think what you want to do is to create a dialog-based application, which
you probably have done, then use the resource editor to create another
dialog for the tree view menu. Then use ClassWizard to create a class for
the tree view menu dialog.

Most of that is probably not new for you. The thing that makes it all fit
together is that you can show a (modal) dialog using DoModal. Just as your
dialog-based application's InitInstance shows the dialog using DoModal, you
can use DoModal in the handler for a dialog's button.


Hi all..

I'm new to MFC and doc/view. Heck I'm new to C++ design. But I'm currently
trying
to start a project with a dialog box. When the user press a button, it would
open
a tree view menu in doc/view format (After process a bunch of data using
methods
in the doc class). I can create doc/view tree menu with VC++ AppWizard and I
also
can create a dialog box with AppWizard. But how do I create a dialog box
with a
button that would open a tree menu with doc/view form??? I was thinking of
creating two separate projects (one with a dialog box and another with the
tree
menu) and attempt to connect the two together (which sounds like a messy
job).
But I believe that there should be a way in VC++ and MFC for me to add a
piece of
code that would create a document/view tree view menu once a button is
pressed.
Thank you for the assistance in advance. (I was even thinking of putting the
dialog box and the tree view in two projects in a space but I figure that it
won't be a good way of doing it).

Peter



Fri, 12 Sep 2003 10:09:23 GMT  
 use a dialog button to open a doc/view menu (In tree view)
Quote:
-----Original Message-----

If I understand your wishes, it seems like you simply need to call the CWinApp's
OpenDocumentFile method with the desired filename from the appropriate method in
the dialog, in response to the button press.  This would cause your document to
open in its own frame window, displaying your view.

Thank you very much. I see the OpenDocumentFile is called from within
ProcessShellCommand, which is automatically placed in the InitInstance method of
the app when I use AppWizard. In the InitInstance method, it also perform other
tasks such as new CSingleDocTemplate and the combination of ShowWindow and
UpdateWindow. I will try to place these functions in the method that respond to
the button press to see how it works. Do you think these functions are necessary?

Peter  



Sat, 13 Sep 2003 00:57:21 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Use a dialog box to open a doc/view menu (in tree view)

2. Newbie: Opening CFormViews without using Doc/View

3. How to Assign the Work to Dynamically created Menus while using Doc View Arch

4. Doc/View displayed when button is pressed on dialog

5. Getting 2nd Doc/View data from 1st Doc/View

6. Main window, choose file dialog, tree views, and toolbar buttons

7. Main window, choose file dialog, tree views, and toolbar buttons

8. open a view from a dialog button

9. Trapping Menu ID (command) and Grabbing Menu label in Doc/View

10. Problem with ICON for doc using doc/view.

11. Help with Tree Control in Doc/View

12. Help with Tree Control in Doc/View

 

 
Powered by phpBB® Forum Software