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!

Download source files 7KB


  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • A leading provider of tools and services to the health care industry was looking to implement automated chargeback reports with aggregation of tiered storage usage across multiple business units and applications. When the company's storage administrators attempted to create this system in-house, their productivity took a huge hit and they discovered the task was too challenging, as well. Read this case study to learn how this company was able to increase storage utilization, reduce storage consumption, and …

  • Why use NoSQL? Innovative companies like AT&T, GE, and PayPal have successfully transitioned from relational to NoSQL for their critical web, mobile, and IoT applications. By understanding where to introduce NoSQL, how to model and access the data, and how to manage and monitor a distributed database, you can do the same. This white paper explains the need for non-relational databases, describes advantages of NoSQL, and clarifies the important difference between SQL and NoSQL databases. We walk you …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date