Hmm...
It looks that NM_CLICK = -2
is not good solution because is triggered every time when leftMause button is clicked
on current tab.
I still search for right option and get something
( i still cannot found example (C) with tabbed editor)
but found one example in VB :
CASE WM_NOTIFY
NMHDR notify at lparam
Select notify.code
case -552 'TCN_SELCHANGING
'leaving tab
int p = GetSelectedTab(tc)
print "LEAVING->TAB:" + str(p)
autosave()':'FindTab()
case -551 'TCN_SELCHANGE
'selected tab
'autoSave()
'int i = GetSelectedTab(tc)
'print "SELECTED->TAB:" + str(i)
FindTab()
End Select
/* VB code
Select Case tNM.code
Case TCN_SELCHANGING
lTab = SelectedTab
RaiseEvent BeforeClick(lTab, bCancel)
If (bCancel) Then
ISubclass_WindowProc = 1
End If
Case TCN_SELCHANGE
lTab = SelectedTab
RaiseEvent TabClick(lTab)
Case NM_RCLICK
RaiseEvent TabRightClick
End Select
*/
I hope that i will fix this soon...