Replacing a View in a Splitter Window (102827)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++ for Windows, 16-bit edition 1.0
- Microsoft Visual C++ for Windows, 16-bit edition 1.5
- Microsoft Visual C++ for Windows, 16-bit edition 1.51
- Microsoft Visual C++ for Windows, 16-bit edition 1.52
- Microsoft Visual C++, 32-bit Editions 1.0
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
This article was previously published under Q102827 SUMMARY The SPLIT sample demonstrates the following Foundation
Class programming concepts: - A ReplaceView() function can be created which replaces a
view in a CSplitterWnd pane with another. The function replaces a view but uses
the same CDocument object. This function can be helpful if a programmer wants
to keep the same frame window and document for a splitter pane and only wants
to delete a view in a pane and replace it with another.
- The CDocument variable m_bAutoDelete can be used to prevent
the destruction of a CDocument object if all views of the document are
destroyed.
- The CWnd::PreCreateWindow() function can be used to prevent
the main application from having a thick frame thus preventing the user from
resizing the main application window.
- By trapping the WM_SETCURSOR, WM_MOUSEMOVE, and
WM_LBUTTONDOWN messages of a CSplitterWnd, you can fix the splitter bars in a
splitter window so that they can't be moved by the user.
- CSplitterWnd panes can contain regular CWnd objects and are
not limited to the use of CViews. This sample places a dialog in the first
pane.
- The undocumented CWnd::CenterWindow() can be used to
position windows at the center of the screen.
The
following files are available for download from the Microsoft Download
Center: Split.exe For additional information about how
to download Microsoft Support files, click the following article number to view
the article in the Microsoft Knowledge Base: 119591 How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that the file
was posted. The file is stored on security-enhanced servers that help to
prevent any unauthorized changes to the file.
NOTE: Use the -d option when running SPLIT.EXE to decompress the file
to re-create the proper directory structure.
Modification Type: | Minor | Last Reviewed: | 8/5/2004 |
---|
Keywords: | kbdownload kbDocView kbSample KbUIDesign KB102827 kbAudDeveloper |
---|
|