问题:如何动态显示CStatic的文本?为什么下面的方法不行?
for(int i = 1; i<RcEdit_RowCount; i++)
{
GetDlgItem(RcLabelTable[i][0])->SetWindowText(_T(""));
GetDlgItem(RcLabelTable[i][1])->SetWindowText(_T(""));
GetDlgItem(RcLabelTable[i][2])->SetWindowText(_T(""));
}提示出错信息为unhandled exception,以下是出错的地方:
void CWnd::SetWindowText(LPCTSTR lpszString)
{
ASSERT(::IsWindow(m_hWnd)); if (m_pCtrlSite == NULL)
::SetWindowText(m_hWnd, lpszString);
else
m_pCtrlSite->SetWindowText(lpszString);
}