void CControlBase::SetDisable(BOOL bIsDisable) { if(m_bIsDisable != bIsDisable) { SetControlDisable(bIsDisable); UpdateControl(true); } }
// 从XML设置禁用属性 HRESULT CControlBase::OnAttributeDisable(const CString& strValue, BOOL bLoading) { if (strValue.IsEmpty()) return E_FAIL; SetControlDisable(::StrToInt(strValue) > 0 ? true : false); return bLoading?S_FALSE:S_OK; }