AFX_WM_ON_MOVE_TAB notification from CMFCTabCtrl

103 Views Asked by At

In my application I have 3 tabbed panes, I am tracking/capturing AFX_WM_ON_MOVE_TAB in my mainframe class.

The tab control sends current and previous active tab . It doesn't send its window handle.

SendMessage(AFX_WM_ON_MOVE_TAB, m_iTabBeforeDrag, m_iActiveTab);

how will I know which tab control sends this message?

1

There are 1 best solutions below

0
Roger Lipscombe On

Give each tab control a parent window that goes in between your mainframe and the tab. Then when the tab control sends its message to its parent, you know which tab control it came from.

Instead of:

 MainFrame
 |   |   |
TC1 TC2 TC3

Use:

 MainFrame
 |   |   |
 X1  X2  X3
 |   |   |
TC1 TC2 TC3