下面的一段代码,为什么当我输入的数据0<m_nPage0<=100时保存的数据是对的,不再这个范围内的保存的数据就变成了65636了呢??请高手帮忙解惑……
CSpinButtonCtrl *Page0=(CSpinButtonCtrl *)GetDlgItem(IDC_SPIN_Page0);
int m_nPage0=Page0->GetPos();
theApp.WriteProfileInt("Param","Page00",m_nPage0);
CSpinButtonCtrl *Page0=(CSpinButtonCtrl *)GetDlgItem(IDC_SPIN_Page0);
int m_nPage0=Page0->GetPos();
theApp.WriteProfileInt("Param","Page00",m_nPage0);
int m_nPage0=Page0->GetPos();
theApp.WriteProfileInt("Param","Page00",m_nPage0);
CSpinButtonCtrl::GetPos
The current position in the low-order word. The high-order word is nonzero if an error occurred.
还有你可以使用CSpinButtonCtrl::SetRange设置有效区域,不符合区域不让输入或者输入后变为一个合理值这都是解决方案.