16,472
社区成员
发帖
与我相关
我的任务
分享
void CCheckDlg::LogFile()
{
CString strLogMsg;
CListBox *pListBox = (CListBox*)GetDlgItem(IDC_LISTBOX_LOGS);//这句出错
strLogMsg.Format("welcome");
pListBox->AddString(strLogMsg);
}
CWnd* CWnd::GetDlgItem(int nID) const
{
ASSERT(::IsWindow(m_hWnd));
if (m_pCtrlCont == NULL)
return CWnd::FromHandle(::GetDlgItem(m_hWnd, nID));
else
return m_pCtrlCont->GetDlgItem(nID);
}