VC++如何读取按钮上的文字

2025-03-06 02:54:25
推荐回答(3个)
回答1:

void CmfcdialogDlg::OnBnClickedButton1()
{
GetDlgItem(IDC_BUTTON1)->GetWindowTextW(strTextonButton);
m_edit1.SetWindowTextW(strTextonButton);
// TODO: Add your control notification handler code here
}

(附件为VS2010项目)

回答2:

可以读取啊!GetWindowText()
就可以

回答3:

什么办法?使用GetWindowText函数。