If you're male or female. Here you go. FOLLOW THIS STEP BY STEP:
1) Make a new Win32 Application project. Ensure that it has a single source file with document/view support. Include the "afxwin.h" library file. Declare a CSplitterwnd variable.
2) Understand the difference between static and dynamic splitter windows. A static splitter window has a static number of panes, determined inside the parent frame's
"OnCreateClient" function during initialization. A user can only change the size of the panes. A dynamic splitter window provides controls that enable a user to create, delete and resize additional panes as required. During initialization, the framework creates a single pane by default.
3) Place the CSplitterWnd variable on a parent window or frame. This example utilizes a CFrameWnd object as the parent frame. From inside the "OnCreateClient"
member function of "CFrameWnd," call the "CreateStatic" or "Create" function of "CSplitterWnd," depending on whether you want to create a static or a dynamic splitter window, respectively.
4) Adjust the height and width of the individual panes through the "SetRowInfo" and "SetColumnInfo" member functions. You call them inside "CreateStatic" or "Create" to initialize the height and width to zero. Call them again after "CreateStatic" and "Create" to specify the desired pane dimensions.
5) Create scroll bars between the panes. A splitter window that has one row and two columns will display a WS_VSCROLL style scroll bar. One that has two rows
and one column will display a WS_HSCROLL style scroll bar. The default scroll bars are children of the CSplitterWnd class. A static CSplitterWnd object can support scroll bars from the classes of its panes.
just so you know embedding a splitter window in a CFrameWnd object will look sunken.
It's best to derive a class from CFrameWnd so as to remove its WS_EX_CLIENTEDGE style before creation.
Doesn't matter < Xcure >
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment