none
difference between SDI and MDI

    Question

  • Plz tell me the diff between SDI and MDI?

     

    Diff between Modal and Modeless Dialogs??

    Tuesday, January 03, 2006 8:38 AM

Answers

  • The full answer is available in MSDN, but in a nutshell SDI or a single document interface is a window that can only handle one document at a time per window. An example of an SDI is Notepad (you can only edit one text file per Notepad window. If you want to edit two files, you need two Notepad windows).

    An MDI or multiple document interface is a window that can handle more than one document at a time (usually by creating subwindows). An example of an MDI is Visual Studio. You can have multiple Cpp files open in the same Visual Studio window (you navigate through each CPP file by using the tabs, or the Window menu). Most (but not all) MDIs implement a tabbed style interface similar to Visual Studio to navigate between documents.

    Other examples of SDI/MDI are:

    • Notepad vs. Editpad lite (the latter implements a tabbed interface).
    • IE6 and Mozilla Firefox (the latter has optional tabbed browsing which is an MDI, the former does not... of course the msn toolbar does allow you to have tabbed browsing).
    • Microsoft Word '97 and Word 2002 (the earlier version had an MDI interface, which Microsoft ditched in favour of an SDI)

    If you were forced to choose between an SDI and an MDI, I'd recommend the SDI approach as it's simpler to create. An MDI is recommended if you know you want a tabbed style interface upfront.

    A Modal dialog is a dialog which disables its owner (the window specified in parameter 3 of DialogBox()). An example of a modal dialog is an error messagebox. A modeless dialog (an example is the find dialog box) allows you to interact with the parent form whilst it is shown.

    Wednesday, January 04, 2006 12:53 AM
    Moderator