我在CPropertySheet中加入了几个属性页,在每个属性页中有几个编辑框,我想在CPropertySheet调用DoModal()前使某属性页中的编辑框变为不可用,应该怎么办?

解决方案 »

  1.   

    某属性页的OnInitDialog里设置 EnableWindow
      

  2.   

    BOOL CMod2Page::OnInitDialog() 
    {
    CPropertyPage::OnInitDialog(); // TODO: Add extra initialization here
    if(!m_pSavePrint.m_bCanEdit)
    m_edit.EnableWindow(FALSE);

    return TRUE;  // return TRUE unless you set the focus to a control
                  // EXCEPTION: OCX Property Pages should return FALSE
    }
    代码如上可是edit仍然可用
      

  3.   

    if(!m_pSavePrint.m_bCanEdit) 是什么?
    你要确保 确实执行了m_edit.EnableWindow(FALSE);