HOWTO: How To Disable Tabs in CPropertySheet (151662)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
This article was previously published under Q151662 SUMMARY
This article describes how to disable tabs in a CPropertySheet so the user
is not allowed to activate the tab. To accomplish this behavior, you can do
the following:
- Handle the TCN_SELCHANGING notification in the sheet and save the
index of the current tab.
- Handle the TCN_SELCHANGE notification in the sheet and call
GetActiveIndex() to determine if you want the page disabled.
- If you want the page disabled, post a PSM_SETCURSEL message to the
sheet using the index that was saved in TCN_SELCHANGING.
The sample code below shows how to implement an EnablePage() function
that allows you to enable and disable pages.
Modification Type: | Major | Last Reviewed: | 10/24/2003 |
---|
Keywords: | kbhowto kbPropSheet KbUIDesign KB151662 |
---|
|