0
votes

I have created a MDI application with tabbed group.

Each time I drag and drop one tab from tab bar to view, it will create a new tab group and divide view according to the number of tab groups. But I want to allow my application to create only two tab groups.

I have done my work by regrouping a new tab group with the tab group related to the drag-and-drop tab.

But this solution is not good because the view blinks for a short time.

I'm looking for a better solution. I know: drag-and-drop tab to view => create new tab group is default support by MDI Tabbed Group.

How do I check it and prevent it?

1
Have any one can help me with this problem ?Jacky

1 Answers

0
votes

The complete job of detaching and moving the Tabs arround is done upon the message AFX_WM_ON_MOVETABCOMPLETE (registered Windows message), this message is handled by CMDIClientAreaWnd::OnMoveTabComplete.

So you can subclass your MDI client window and you can intercept the message. Check what you want, and if you don't want to allow the drag&drop Operation just return.

If you want to allow this drag&drop just call the base implementation CMDIClientAreaWnd::OnMoveTabComplete.