We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,716 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

CSplitter splitter definition

This is a homework assignment.

I am in a Software Engineering class and we have to implement a change request in a group project. My group chose Winmerge, and my change request is to do the following:

1.) Set the divider to reset to the middle on double-click.

2.) Allow the user to snap the divider to certain increments (10% of width) with (keyboard button)+click.

I don't understand how CSplitter works. Is there a definition of the splitter that I can work with? The application already has double click accelerators defined for the diff tool, so I'm not sure how I can implement my change request without conflicting with this definiton. I tried adding a new message to the CSplitter class and modifying the divider that way, but the application doesn't respond to my double click on the divider.

void CSplitterWndEx::OnMButtonDblClk(UINT nFlags, CPoint point)
{

    CSplitterWnd::OnMButtonDblClk(nFlags, point);
    // TODO: Add your message handler code here and/or call default
    CRect rect;
    CSplitterWnd::GetClientRect(&rect);
    SetColumnInfo(0,rect.Width()/2,rect.Width()/2);
    RecalcLayout();

}

What can I do? Any hints or tips?

2
Contributors
1
Reply
6 Hours
Discussion Span
2 Months Ago
Last Updated
8
Views
greatman05
Light Poster
25 posts since Mar 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Do you mean CSplitter from MFC (link)? AFAIK you change the size of each pain by drag-and-drop, not by double clicking or other key combinations. That's all build into the CSplitter class, you need to do nothing.

Ancient Dragon
Achieved Level 70
Team Colleague
32,116 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,575
Skill Endorsements: 68

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0794 seconds using 2.75MB