CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Location
    Jodhpur -> Rajasthan -> INDIA
    Posts
    453

    What mechanism should i use in order to send command from one splitter to another?

    Hello well subject might seems vague, So i will try to detail it.

    I am developing an Auto-CAD like application in which I am having SplitterWindow with three panes: (3 rows and 1 column)

    1.0 MainView -- Used for drawing
    2.0 ListView -- below mainview to display list of commands. II row
    3.0 Edit View -- This is in third row. Here user will type command and this command on typing must be added to the list in listview (View no. 2) and also the appropriate action should be taken i.e. drawing figure on View1

    Guide/Suggest me how to implement this.

    Also tell me that will be there something different if i implement with MDI application.

    Well till now i do not have any idea related to MDI application. I have just used SDI only. Well this is not the matter of much importance at this time.


    Apart from this I also want Printing support for my application to print:

    1.0 Content of View1 i.e. whatever figure is drawn
    2.0 Content of View2 i.e listview, so that one can even get printout of commands entered to system


    Thanks in advance

    Sandeep
    Leave Your Mark Wherever You Go
    http://www.danasoft.com/sig/d0153030Sig.jpg

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: What mechanism should i use in order to send command from one splitter to another?

    MFC core provides generic mechanism to routing command messages. So sending WM_COMMAND message with commandID in wParam to main window would lead to command handler invokation if some of your classes (mainframe, view or document) has it. If you want to provide chained command processing (one messge invokes more than one handlers) you need no use ON_COMMAND_EX macro instead of ON_COMMAND. See details in MSDN.
    Best regards,
    Igor

  3. #3
    Join Date
    Jan 2002
    Location
    Houston, TX
    Posts
    1,421

    Re: What mechanism should i use in order to send command from one splitter to another?

    If you have used the doc/view architecture, you can store all the data (commands, etc) in the doc, and at any point you want to update the other views, call the document's UpdateAllViews function.

    This calls the OnUpdate function in all views connected to the document, and each view then updates as needed (you have to write the code of course.)

    Hope that helps.
    Be sure to rate those who help!
    -------------------------------------------------------------
    Karl - WK5M
    PP-ASEL-IA (N43CS)
    PGP Key: 0xDB02E193
    PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured