Vc++ 4(mdi)


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Vc++ 4(mdi)

  1. 1. Visual C++ Programming M ultiple D ocument I nterface and Splitter windows
  2. 2. Multiple Document Interface(MDI) <ul><ul><li>The Multiple Document Interface is a design specification of the Windows OS that defines a user interface for applications that enable the user to work with more than one document at the same time. </li></ul></ul><ul><ul><li>MDI applications allow multiple document frame windows to be open in the same instance of an application. </li></ul></ul><ul><ul><li>It has a window within which multiple child windows (frame windows themselves) can be opened, each containing a separate document(sometimes of different types). </li></ul></ul>
  3. 3. Differences between MDI and SDI <ul><li>Some fundamental characteristics distinguish MDI applications from SDI applications </li></ul>SDI MDI SDI applications, require the user to close the currently open document before opening another. MDI applications permit the user to have two or more documents open for editing at once. SDI does not support multiple documents at all. MDI applications some times support multiple document types. SDI applications generally feature just one menu. MDI applications have at least two
  4. 4. Differences between MDI and SDI(contd..) SDI MDI SDI applications use just one frame window—the top-level frame window that serves as the application's main window and frames views of open documents. MDI applications use two: a top-level frame window and child frames or document frames that float within the top-level frame window and frame views of open documents
  5. 5. Splitter Windows <ul><li>SDI applications do not support multiple views of a document. The best way to present two or more concurrent views of a document is to use a splitter window based on MFC‘s CSplitterWnd class. </li></ul><ul><li>A splitter window is a window that can be divided into two or more panes horizontally, vertically, or both horizontally and vertically using movable splitter bars. </li></ul><ul><li>Each pane contains one view of a document's data. </li></ul><ul><li>In an SDI application, the splitter window is a child of the top-level frame window. In an MDI application, the splitter window is a child of an MDI document frame. </li></ul>
  6. 6. Types of Splitter windows <ul><li>MFC supports two types of splitter windows: static and dynamic. </li></ul>Static Dynamic The numbers of rows and columns in a static splitter window are set when the splitter is created and can't be changed by the user. The maximum number of rows and columns a dynamic splitter window can be divided into are specified when the splitter is created but can be split and unsplit interactively. The user is, however, free to resize individual rows and columns. The views displayed in a dynamic splitter window's panes aren't entirely independent of each other A static splitter window can contain a maximum of 16 rows and 16 columns. A dynamic splitter window is limited to at most two rows and two columns Eg: Windows Explorer Eg: Code window