CStatic* pWnd = (CStatic*)GetDlgItem(IDC_STATIC_1);怎么改能获得IDC_STATIC_2中的内容??急急!!

2024-11-22 14:12:32
推荐回答(1个)
回答1:

什么意识啊
CStatic* pWnd = (CStatic*)GetDlgItem(IDC_STATIC_2);
CString s;
pWnd->GetWindowText(s);
AfxMessageBox(s);//这里的s就是内容