同上。

解决方案 »

  1.   

    会不会是把那个page不可用就行了?
      

  2.   

    1、在Sheet类中定义一个变量,保存待锁定页的索引值
    int m_nLastActive;
    2、处理Sheet类中的TCN_SELCHANGING通知,调用GetActiveIndex()函数,判断当前要显示的页面的索引值是否与m_nLastActive相同。3、如果索引值与m_nLastActive不同,则按如下方式发送消息,以锁定显示:
    PostMessage (PSM_SETCURSEL, m_nLastActive);二、实现步骤(假设我们锁定第一页,m_nLastActive值置为0)
    1、覆盖Sheet类的OnNotify函数
    BOOL CMyPropertySheet::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) 
    {
    NMHDR* pnmh = (NMHDR*)lParam;
    // tab is about to change
    if (TCN_SELCHANGING == pnmh->code)
    // save the current page index
    m_nLastActive = GetActiveIndex ();
    // tab has been changed
    else if (TCN_SELCHANGE == pnmh->code)
    {
    // get the current page index
    int nCurrentPage = GetActiveIndex ();
    // if current page is in our map of disabled pages
    if (m_nLastActive != nCurrentPage)
    // activate the previous page
    PostMessage (PSM_SETCURSEL, m_nLastActive);
    }
    return CPropertySheet::OnNotify(wParam, lParam, pResult);
    }