Disable Tab
This class provides enabling and disabling of items in a
tab control. The main
purpose of the class is to provide this functionality for property
sheets, but I think it may
work for tab controls in general (I have not tested this).
Anyway, to use the class, just include the source and header file into your project. Create a member variable of type CTabCtrlEx in your property sheet derived class. Then, in the OnInitDialog function of your property sheet class call the CTabCtrlEx install function:
BOOL CMyPropertySheet::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
// TODO: Add your specialized code here
...
m_tab.Install( this );
}
To enable or disable items, call the EnableItem() function:
m_tab.EnableItem( 0, FALSE );
I have not had time to thoroughly test this class, but the code is fairly well commented, so following it should not be very difficult if you have problems. Please send me any comments, feedback bug fixes, etc. Enjoy!
IT Offers
More for Developers
Top Authors
- Voted: 13 times.
- Voted: 11 times.
- Voted: 11 times.
- Voted: 8 times.
- Voted: 8 times.
- Paul Kimmel 214 articles
- Zafir Anjum 120 articles
- 15Seconds.com 99 articles
- Tom Archer - MSFT 83 articles
- Jeffrey Juday 82 articles


All