I haven't used subpanels enough so this may sound like a stupid idea.
Can you dynamically change the levels of a subpanel? If this is the case and at run time you can change which is on top, then on option (another bad one probably) is you can get a reference to all controls in panel that's on top then store the coordinates of the controls. Then register a user event for a mouse click. If it was clicked and the mouse is not on a control (looking at coordinates of each control) then move the next subpanel to the top and simulate a mouse click at the same position with a Windows DLL. (assuming Windows). Then perform the same operation where you see if the coordinates of the mouse are on a control. If it is then good perform that event, if it is not then go through the subpanels until all have been moved to the top.
A problem that could occur is if you have too many subpanels it may take some time to go through them all moving them all to the top. Helping this would be to store all the coordinates of controls at the beginning instead of using control references and getting coordinates every time. Also I have no idea if you can move sub panel levels, or even how much time it may take to perform the operation. Good luck.