激活属性页会挂起程序? 问:我在视中建立了非模态属性工作表,里面有三个属性页分别为A,B,C。其中第三个属性页 (假设为C)又建立了一个属性工作表包含四个工作页(W,X,Y,Z)。问题是这样的:先 激活四个工作页中的一个,然后再激活B属性页,则系统会挂起! 答:1)为子属性工作表继承OnInitDialog()并加入下面一句: WS_EX_CONTROLPARENT style using ModifyStyleEx function. 或在m_oCPageCSheet.Create(this,WS_CHILD | WS_BORDER |WS_VISIBLE)加入 WS_EX_CONTROLPARENT属性 2)你的数据确认程序是错误的,应该象下面的代码所做的: BOOL KSatSegThreshold::OnKillActive() { // DONE: Add your specialized code here and/or call the base class BOOL bRet = TRUE; if ((KSatEditor::IsSatEditorInitializing() == false) && (SaveDlg() == false)) { BOOL bRet = FALSE; } return bRet; } BOOL KSatSegThreshold::OnSetActive() { // DONE: Add your specialized code here and/or call the base class BOOL bRet = TRUE; if ((KSatEditor::IsSatEditorInitializing() == false) && (UpdateDlg() == false)) { bRet = FALSE; } return bRet; }