CDialog一个问题|?????

my9999 2008-10-16 05:18:36
dialog的caption:aaaaa,如何获得caption属性,并将它显示到一个EDITbox里。小弟初学者,请讲的详细些?
...全文
64 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
pigpy 2008-10-17
  • 打赏
  • 举报
回复
给你的EditBox关联一个CEdit的变量,假设为m_edit,然后可以在OnInitDialog(...)函数中(或者其他函数也可以)添加代码:

CString strCaption;
::GetWindowText(m_hWnd,strCaption);
m_edit.SetWindowText(strCaption);
yangyoucheng22 2008-10-16
  • 打赏
  • 举报
回复
楼上正解
CString strCaption;
pDlg->GetWindowText(strCaption);
pEditBox->SetWindowText(strCaption);
E_xplorer 2008-10-16
  • 打赏
  • 举报
回复
CString strCaption;
pDlg->GetWindowText(strCaption);
pEditBox->SetWindowText(&strCaption);
yayafu 2008-10-16
  • 打赏
  • 举报
回复
dialog:GetWindowText/EDITbox:SetWindowText
id27145 2008-10-16
  • 打赏
  • 举报
回复
GetWindowText/SetWindowText

15,978

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧