Click here to Skip to main content
15,867,141 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have a CDockablePane in my MFC ribbon based MDI application in which I host a CView derived object.

If the pane is floating and I left click within the area occupied by the View, I am subsequently unable to access most of the other windows or their controls eg menu tabs do not work nor do any of the other ribbon controls. Expand/Collapse of items in a CTreeCtrl in another CDockable pane does not work,unable to change column sizes in a CListCtrl etc.

As soon as the Pane is docked,full control is restored.

The problem affects any View derived objects.For example,if I host a CListCtrl in the Pane, then control is never lost, but if I host a CListView then control is lost as described above. Clicking on any area of the Pane not covered by the View does not result in a loss of control.

The problem seems to be related to Message routing and the View when it has the CDockable pane as its parent and the Mainframe as its 'grand'parent (when docked it has the MainFrame as its parent and no grandparent) but I have so far been unable to find a way to resolve it.

What I have tried:

I have tried changing ownership of the Views, re-despatching messages,etc but so far to no avail! Google has offered fairly little that is directly applicable.
Posted
Updated 17-Apr-20 2:42am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900