Chapter 18
Download
1 / 12

Chapter 18 - PowerPoint PPT Presentation


  • 116 Views
  • Uploaded on

Chapter 18. Splitter Windows and Multiple Views. The Splitter Windows. An object of class CSplitterWnd represents the splitter window. As far as Windows is concerned, a CSplitterWnd object is an actual window that fully occupies the frame window (CFrameWnd or CMDIChildWnd) client area.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Chapter 18' - reilly


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Chapter 18

Chapter 18

Splitter Windows

and

Multiple Views


The splitter windows
The Splitter Windows

  • An object of class CSplitterWnd represents the splitter window.

  • As far as Windows is concerned, a CSplitterWnd object is an actual window that fully occupies the frame window (CFrameWnd or CMDIChildWnd) client area.

  • Like RichText did


View options
View Options

  • SDI application with splitter window, single view class

  • SDI application with splitter window, multiple view classes

  • SDI application with no splitter windows, multiple view classes

  • MDI application with no splitter windows, single view class

  • MDI application with no splitter windows, multiple view classes

  • MDI application with splitter child windows


Dynamic and static splitter windows
Dynamic and Static Splitter Windows

  • The user can split the window at any time by choosing a menu command or by dragging a splitter box.

  • The panes are pre defined and can not be changed, However the user can move the split changing the size of them.


Ex18a example a single view class sdi dynamic splitter
Ex18a Example: A Single View Class SDI Dynamic Splitter

  • the user can dynamically split the view into four panes with four separate view objects, all managed by a single view class.

  • You create an SDI project and select Split Window on the User Interface Features page (That was hard  )

  • MFC Application Wizard adds code to your CMainFrame class. You can also add this code to a current project.



Ex18b example a double view class sdi static splitter
Ex18b Example: A Double View Class SDI Static Splitter

  • Defines a second view class and allowing a static splitter window to show the two views.

  • The splitter is initialized with two panes each with it’s own view class. (Hex and String code in text)



Ex18c example switching view classes without a splitter
Ex18c Example: Switching View Classes Without a Splitter

  • Ex18c is an SDI application that switches between the CStringView and CHexView with commands from the View menu.

  • Button / check menu handlers are needed to switch the views used.

  • E.G. GetActiveView()->IsKindOf(RUNTIME_CLASS(CStringView)));



Ex18d example a multiple view class mdi application
Ex18d Example: A Multiple View Class MDI Application

  • Ex18d, creates a multiple view class MDI application without a splitter window.

  • This example uses the CDocTemplate object and code hooks in both the application and main frame classes



ad