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?