15,978
社区成员
发帖
与我相关
我的任务
分享
//调用子窗口
CRect m_deployRect;//窗口位置
CDialog m_subWindR_01;
GetDlgItem(IDC_DEPLOY_AREA)->GetWindowRect(&m_deployRect);
ScreenToClient(&m_deployRect);
m_subWindR_01.Create(IDD_SUBDLG_R_01, this);
BOOL CSubDlg::UpdateEditValue(CString &strVal, BOOL bGet)
{
BOOL bRet = FALSE;
CEdit *pEdit = (CEdit*)GetDlgItem(IDC_EDIT1);
if(pEdit && pEdit->m_hWnd)
{
if(bGet) //read
{
pEdit->GetWindowText(strVal);
}
else
{
pEdit->SetWindowText(strVal);
}
bRet = TRUE;
}
return bRet;
}