Multi-line string into dialog box
-
Hi, I am trying to write a multi-line string into an edit control on a dialog box. I am using following code however not getting any success.
CWnd *pWnd =GetDlgItem(IDC_STATIC_MSGCNT);
CRect lpRect = CRect(100,100,20,20);
pWnd->GetWindowRect(&lpRect);CEdit \*pEdit = new CEdit(); pEdit->Create(ES\_MULTILINE|ES\_LEFT|ES\_READONLY,lpRect,this,m\_iEditCTLID++); pEdit->ShowWindow(SW\_SHOW); CString str; str.Format("%d",pWLSErrRpt->GetWLSMessageNo()); pEdit->SetWindowTextA(str);
Appreciate your help. Thanks
-
Hi, I am trying to write a multi-line string into an edit control on a dialog box. I am using following code however not getting any success.
CWnd *pWnd =GetDlgItem(IDC_STATIC_MSGCNT);
CRect lpRect = CRect(100,100,20,20);
pWnd->GetWindowRect(&lpRect);CEdit \*pEdit = new CEdit(); pEdit->Create(ES\_MULTILINE|ES\_LEFT|ES\_READONLY,lpRect,this,m\_iEditCTLID++); pEdit->ShowWindow(SW\_SHOW); CString str; str.Format("%d",pWLSErrRpt->GetWLSMessageNo()); pEdit->SetWindowTextA(str);
Appreciate your help. Thanks
Multiline editbox requires "\r\n" in the string to split the string into multiple lines.
-
Hi, I am trying to write a multi-line string into an edit control on a dialog box. I am using following code however not getting any success.
CWnd *pWnd =GetDlgItem(IDC_STATIC_MSGCNT);
CRect lpRect = CRect(100,100,20,20);
pWnd->GetWindowRect(&lpRect);CEdit \*pEdit = new CEdit(); pEdit->Create(ES\_MULTILINE|ES\_LEFT|ES\_READONLY,lpRect,this,m\_iEditCTLID++); pEdit->ShowWindow(SW\_SHOW); CString str; str.Format("%d",pWLSErrRpt->GetWLSMessageNo()); pEdit->SetWindowTextA(str);
Appreciate your help. Thanks
itkid wrote:
I am trying to write a multi-line string into an edit control...
No, you are writing a number to the control.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons