Disable Tab
Posted
by Kevin Lussier
on August 6th, 1998
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!

Comments
Example project for this class?
Posted by break; on 07/25/2008 10:15amHello, does any one have a little sampleproject for me, i can't start my own :( ?! regard
ReplyBug in multiple monitor systems
Posted by srbrook on 05/11/2006 06:45amClicking the tab does not work when the application is placed on a monitor with negative co-ordinates (ie to the left of the main monitor) Fix in OnSelchanging function by replacing CPoint point( LOWORD( lastPos ), LOWORD( lastPos ) ); by CPoint point( lastPos ); See MSDN documentation for GetMessagePos() for reason why not to use LOWORD and HIWORD with this function.ReplyExcellent, but one problem though
Posted by Legacy on 11/19/2003 12:00amOriginally posted by: Yusuf
Excellent class, but there is a problem. If another window is placed on top of the tabs and then moved, the tab headers are black. This after Annelies fix on row 108. Any solutions??
ReplyExcellent Class!!!
Posted by Legacy on 05/28/2003 12:00amOriginally posted by: Masudkhan
Hi Kevin Lussier,
This is rellay an amazing class.
Actually I was looking for such class from a lomg time.
I went thru a lot of other webpages. Infact a Microsoft has published a page on how to disable tabs, which is not as simple as this one.
This really saved a lot of effort of mine.
--
ReplyThanks & Regards
Masudkhan
Help!!! WinXP Bug
Posted by Legacy on 02/03/2003 12:00amOriginally posted by: Indivara
ReplyDoesn't work under some Win2K implementations
Posted by Legacy on 12/11/2002 12:00amOriginally posted by: Lynn Reid
Just a warning.... I used this code to simplify disabling tabs. Works great in standard Win98, NT, and 2K installations. However, one of my clients has a Win2K installation modified from standard (in ways which I cannot reproduce). This code produces tabs which cannot be selected on her machine -- no matter if they're disabled or not. Sorry I can't provide more details as I can't debug on her machine...
ReplyXP Modifications
Posted by Legacy on 11/14/2002 12:00amOriginally posted by: Rick Austin
ReplyProblems with Windows XP
Posted by Legacy on 10/11/2001 12:00amOriginally posted by: Julien
When making an app XP Theme Style Compatible, the tab control is really badly drawn.
When using the control on a XP System without the Theme Style enabled, the tab control has a white background.
ReplyGreat class - saved me a lot of time
Posted by Legacy on 07/27/2001 12:00amOriginally posted by: Paul S. Vickery
Thanks for a great class - it has saved me a lot of time trying to figure out a way of removing/inserting pages, as it's impossible to insert pages, I can now just enable/disable pages.
ReplyBug-Fix Question: Needs SendKillActive() still Parameter "nItem" ?
Posted by Legacy on 07/22/1999 12:00amOriginally posted by: Olaf Oelsner
Hi
I think SendKillActive() doesnt need "nItem".
Olaf Oelsner
Reply
Loading, Please Wait ...