SAMPLE: Replacing a View in a Splitter WindowID: Q102827
|
The SPLIT sample demonstrates the following Foundation Class programming
concepts:
~ Split.exeFor more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online ServicesNOTE: Use the -d option when running SPLIT.EXE to decompress the file to re-create the proper directory structure.
To understand what the sample does, first execute the program. You will see
a main application window with a splitter window (CSplitterWnd) in its
client area. A selection dialog will be displayed in the first pane and a
view will be displayed in the second pane.
Click on the "View 1" and "View 2" buttons. Notice that the view in the
second pane will switch from one to the other. The view is changing but
looking at the source you'll see that the document stays the same.
The sample project can be converted to a 32-bit Visual C++ 2.x project and
will successfully compile and execute once the following change has been
made:
On line 34 of SPLITTER.CPP, change:
::SetWindowWord
GWW_ID
to:
::SetWindowLong
GWL_ID
If you have comments or suggestions about how to improve this sample,
please send Microsoft a message to the MFC section of the MSLANG forum.
Additional query words: split splitter sample
Keywords : kbfile kbsample kbDocView kbMFC kbVC
Version : 1.0 1.5 1.51 1.52 2.0 2.1 4.0 4.
Platform : NT WINDOWS
Issue type :
Last Reviewed: July 28, 1999