CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2002
    Location
    Australia
    Posts
    54

    Dialog based or MDI/SDI

    Hi all,

    I would like to ask a quick question regarding application design.... I am currently working on a dialog based application that receives, sends, stores and manipulates images and related information. I did not create the app, but am fixing, enhancing it etc. We now have opportunity to create a very similar but much simpler application for a slightly different market ... should I continue with the dialog based application or move over to either SDI or MDI? I have not had experience in programming from the ground up so am not sure what path to take.

    It seems that the SDI/MDI option may make opening, saving images etc a lot easier but I am not sure if it will be the solution we are looking for. As i mentioned above we need to open images, view them, manipulate them, enter information about them (simple database), archive them to a server. Can anyone provide some pointers for me?

    thank you kindly,
    Em

  2. #2
    Join Date
    Feb 2002
    Posts
    5,757
    One design solution is a formview running in SDI. Are you referring to an image viewer or editor? If editor, one solution is MDI.

    Kuphryn

  3. #3
    Join Date
    Apr 2002
    Location
    Australia
    Posts
    54
    thanks for your reply Kuphryn

    It is an image viewer, but you can do such things as invert, rotate, change brightness/contrast. Because we deal with medical imaging we cannot edit the images in any way.

    I will look into the formview option.

    thanks again,
    Em
    Last edited by Emster; June 12th, 2003 at 03:23 AM.

  4. #4
    Join Date
    Apr 2002
    Location
    Australia
    Posts
    54
    Ok - I have been informed (by co-worker) that I should use dialog based because of the following requirement...

    We want to have buttons down the side of the app that fire up other dialogs to set preferences, enter details etc

    I thought that we should be able to do this with an SDI and maybe using a Rebar / Dialogbar to do the buttons - then allowing us to use a view to display images. In our previous application we displayed multiple images by creating an array/matrix of CWnd objects and displayed each image within them - so this is the way I have been directed to go. Would a splitter window help with this option? Or is the previous idea ok? I am not that experienced at this and have only done a small amount of VC++ coding, so would love some more help!

    thanks!
    Em

  5. #5
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    I think that anything a dialog can do a SDI/MDI form view can do better, especially in this context. Note that a form view uses a dialog template. That means anything you can do in a dialog template for a dialog can be done in a dialog template for a form view. So if you put "buttons down the side of the app" for use in a dialog then you can do the same thing for a form view. Using a SDI/MDI form view, the buttons can exist in a separate control bar, as you said.

    When you genearet the SDI/MDI application, you probably want to unselect the option for the document/view architecture so that the application is generated without it. You might be able to create a simple prototype that shows the control bar that creates some sample windows. Doing that would also give you the opportunity to learn about doing things like that.
    Last edited by Sam Hobbs; June 11th, 2003 at 12:12 PM.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  6. #6
    Join Date
    Apr 2002
    Location
    Australia
    Posts
    54
    Thank you for your input Sam - it is most appreciated!
    I have started on a prototype, only to learn it is required for a demo in 2 days, so am starting to panic a little.

    Anyway - just one thing you said below was to unselect the document/view architecture option. Could you explain why this is the case - is that because in my application it would/should not be required? I am still having trouble wrapping my mind around the different frameworks in MFC/Visual C++ ... but I must say I have found many other posts within this forum (some from yourself) quite helpful.

    thank you once again,
    Em

  7. #7
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    Yes I am assuming that your application would not use the MFC document/view architecture but I could be wrong. If in doubt then use it; the only disadvantage is that it is extra stuff in your program but otherwise not much of a problem.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

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