how to calculate number of tabs of CTabCtrl
Posted on 2014-03-31
I am modifying application developed in VC++,MFC 6.0
There are seven tabs in tab control.I have been asked to develop a functionality such that when user clicks fifth tab ,sixth and seventh tab should be visible and when user clicks any of first four tabs,sixth and seventh tab should be invisible.
What I am doing now is on fifth tab On_Show_Window i am inserting two tabs and when user presses any of first four tab I am deleting last two tabs.Problem is now
if user presses any of tab repeatedly error comes because i dont have run time count of number of tabs,There is one public variable m_nNumberOfTab,something like that of inherited class(Inherited from CTabCtrl) but that variable always writtens value 7 irrespective of actual count.Please help how to get actual count