|
-
April 9th, 1999, 09:18 PM
#1
Need help getting text from edit box into client area
I'm building an HTML Editor (MFC Appwizard) and I've created a dialog to
insert hyperlinks.The dialog contains 2 edit boxes IDC_HYP_EDIT
(m_hyp/member variable) andIDC_TEXT_EDIT (m_text/member variable)
The idea here is you type the URL into the first edit box and the text
you want displayed into the second edit box,you then push the insert button (IDOK) and this inserts the link into the HTML code. The problem is that I
can't seem to figure out how to insert the text from the edit boxes into the
client area (MDI Child Window)this is the code that I am using:
void CGoldenFlashHTMLEditorView::OnOpenHyplink()
{
CHypLinkDialog HLdlg;
if (HLdlg.DoModal() ==IDOK)
{
CString m_hyp;
CString m_text;
GetEditCtrl().ReplaceSel("<A HREF=");
GetEditCtrl().ReplaceSel(m_hyp);
GetEditCtrl().ReplaceSel(">");
GetEditCtrl().ReplaceSel(m_text);
GetEditCtrl().ReplaceSel("</A>");
}
}
Any body know what is wrong or missing? There are no build errors it just inserts everything except the text from the edit boxes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|