Multi-view of a single document in VC

Source: Internet
Author: User

Multi-view of a single document in VC

Document and view belong to the observer in design mode. How do I control the moving range of split entries after split windows ?? Train of Thought:

1. Create a cmysplitter class. The base class is csplitterwnd.

2. The onmousemove function of this class is reloaded:

Void cmysplitter: onmousemove (uint nflags, cpoint point)
{
// Restrict the movement range of the shard.
If (point. x <228 | point. x> 600)
{
Cwnd: onmousemove (nflags, point );
}
Else
{
Csplitterwnd: onmousemove (nflags, point );
}
}

3. Then we can split it into normal windows. If (point. x <228 | point. x> 600) the range here can be set as you like.

Iv. Split Window
The splitting window does not need to be detailed. Create a splitting object in maifram. h:

Protected:
Cmysplitter m_wndsplitter; // split the window object

// Implement window splitting in maifram. cpp:
Bool cmainframe: oncreateclient (lpcreatestruct/* lpcs */, ccreatecontext * pcontext)
{
// Create a splitter window
If (! M_wndsplitter.createstatic (this, 1, 2 ))
Return false;
If (! M_wndsplitter.createview (0, 0, runtime_class (cleftview), csize (228,100), pcontext) |
! M_wndsplitter.createview (0, 1, runtime_class (cdataeditview), csize (100,100), pcontext ))
{
M_wndsplitter.destroywindow ();
Return false;
}
Return true;
}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.