Click here to Skip to main content
15,892,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Outputting to MFC Dialog Box Pin
Wes Aday25-Jan-05 9:34
professionalWes Aday25-Jan-05 9:34 
GeneralRe: Outputting to MFC Dialog Box Pin
Bob Ciora25-Jan-05 11:02
Bob Ciora25-Jan-05 11:02 
GeneralRe: Outputting to MFC Dialog Box Pin
toxcct25-Jan-05 9:57
toxcct25-Jan-05 9:57 
GeneralRe: Outputting to MFC Dialog Box Pin
CNewbie25-Jan-05 13:06
CNewbie25-Jan-05 13:06 
GeneralRe: Outputting to MFC Dialog Box Pin
CNewbie25-Jan-05 14:10
CNewbie25-Jan-05 14:10 
GeneralRe: Outputting to MFC Dialog Box Pin
FlyingTinman25-Jan-05 14:54
FlyingTinman25-Jan-05 14:54 
GeneralRe: Outputting to MFC Dialog Box Pin
CNewbie25-Jan-05 15:45
CNewbie25-Jan-05 15:45 
GeneralRe: Outputting to MFC Dialog Box Pin
David Crow26-Jan-05 3:21
David Crow26-Jan-05 3:21 
I would lose the calls to UpdateData(). Rare is the case that it is ever useful.

You did not indicate what control on the dialog box is displaying the text so I will assume it is an edit control. In the dialog's class, you need a CEdit variable (e.g., m_edit). Now your code can look like:

void CParserDlg::OnParse()
{
    char key[16];
    strcpy(key, "Text Here");
    m_strkey = key;
    m_edit.SetWindowText(m_strkey);
}
or
void CParserDlg::OnParse()
{
    m_strkey = "Text Here";
    m_edit.SetWindowText(m_strkey);
}
or
void CParserDlg::OnParse()
{
    m_edit.SetWindowText("Text Here");
}



"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


GeneralRe: Outputting to MFC Dialog Box Pin
CNewbie26-Jan-05 16:24
CNewbie26-Jan-05 16:24 
GeneralSetup Project Pin
Galen_225-Jan-05 5:42
Galen_225-Jan-05 5:42 
GeneralRe: Setup Project Pin
rwestgraham25-Jan-05 23:24
rwestgraham25-Jan-05 23:24 
GeneralMFC and web-site Pin
includeh1025-Jan-05 5:14
includeh1025-Jan-05 5:14 
GeneralRe: MFC and web-site Pin
Tom Wright25-Jan-05 5:37
Tom Wright25-Jan-05 5:37 
GeneralSave/Restore appearance scheme Pin
Member 166110225-Jan-05 4:49
Member 166110225-Jan-05 4:49 
GeneralRe: Save/Restore appearance scheme Pin
David Crow26-Jan-05 3:43
David Crow26-Jan-05 3:43 
Questioninf file??? Pin
charleslau285525-Jan-05 4:40
charleslau285525-Jan-05 4:40 
GeneralDrawDragRect Pin
poiut25-Jan-05 4:17
poiut25-Jan-05 4:17 
QuestionDLL -basic and AFX_MANAGE_STATE macro ??? Pin
GDavy25-Jan-05 2:51
GDavy25-Jan-05 2:51 
AnswerRe: DLL -basic and AFX_MANAGE_STATE macro ??? Pin
David Crow25-Jan-05 3:26
David Crow25-Jan-05 3:26 
GeneralCallback Function VC++ --> VB Pin
racing5725-Jan-05 2:03
racing5725-Jan-05 2:03 
Generalsending data from VC++ to Excel Sheet Pin
neelima_1525-Jan-05 0:12
neelima_1525-Jan-05 0:12 
GeneralRe: sending data from VC++ to Excel Sheet Pin
David Crow25-Jan-05 2:29
David Crow25-Jan-05 2:29 
Questionhow to display integers Pin
doneirik24-Jan-05 23:29
doneirik24-Jan-05 23:29 
AnswerRe: how to display integers Pin
Chris Losinger25-Jan-05 4:36
professionalChris Losinger25-Jan-05 4:36 
GeneralLinker error - looks like message map not getting exported from an extension DLL Pin
Nish Nishant24-Jan-05 22:28
sitebuilderNish Nishant24-Jan-05 22:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.