class CSheet : public CPropertySheet
...
BOOL CSheet::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) 
{
// TODO: Add your specialized code here and/or call the base class

       NMHDR* pnmh = (NMHDR*)lParam;    if (TCN_SELCHANGE == pnmh->code)
       {
           // get the current page index
           int nCurrentPage = GetActiveIndex ();
     if(nCurrentPage ==1)
   {
   AfxMessageBox("can not active this tab");
PostMessage (PSM_SETCURSEL, 0);
   
   }  
       }
return CPropertySheet::OnNotify(wParam, lParam, pResult);
}