Click here to Skip to main content
15,921,210 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNewbie problem Pin
Anonymous4-Oct-05 6:18
Anonymous4-Oct-05 6:18 
AnswerRe: Newbie problem Pin
Ravi Bhavnani4-Oct-05 6:28
professionalRavi Bhavnani4-Oct-05 6:28 
QuestionDialog Controls Pin
LCI4-Oct-05 4:58
LCI4-Oct-05 4:58 
AnswerRe: Dialog Controls Pin
Maximilien4-Oct-05 5:21
Maximilien4-Oct-05 5:21 
GeneralRe: Dialog Controls Pin
LCI4-Oct-05 5:33
LCI4-Oct-05 5:33 
GeneralRe: Dialog Controls Pin
bugDanny4-Oct-05 5:41
bugDanny4-Oct-05 5:41 
GeneralRe: Dialog Controls Pin
Prakash Nadar4-Oct-05 5:47
Prakash Nadar4-Oct-05 5:47 
AnswerRe: Dialog Controls Pin
bugDanny4-Oct-05 5:24
bugDanny4-Oct-05 5:24 
Create a member variable for the static text control. There can be two kinds, either use CString, or CStatic. The function to change the CString variable is simple. For example, say your member variable is CString m_var.

Then,
m_var = "Hello Tech";
UpdateData(FALSE);
The UpdateData() function takes the new setting of m_var and makes it display on the dialog. If you used UpdateData(TRUE) it would take the text from the dialog and update the variable. (Note: UpdateData() updates all the variables on your dialog.)

For a CStatic variable, I think you use, SetWindowText(). So...
m_var.SetWindowText("Hello Tech");
Hope this helps!

Danny

The stupidity of others amazes me!
GeneralRe: Dialog Controls Pin
LCI4-Oct-05 5:50
LCI4-Oct-05 5:50 
GeneralRe: Dialog Controls Pin
bugDanny4-Oct-05 5:57
bugDanny4-Oct-05 5:57 
AnswerRe: Dialog Controls Pin
Trollslayer4-Oct-05 6:42
mentorTrollslayer4-Oct-05 6:42 
QuestionInserting text into text box Pin
si_694-Oct-05 4:54
si_694-Oct-05 4:54 
AnswerRe: Inserting text into text box Pin
Maximilien4-Oct-05 5:27
Maximilien4-Oct-05 5:27 
GeneralRe: Inserting text into text box Pin
si_694-Oct-05 5:38
si_694-Oct-05 5:38 
GeneralRe: Inserting text into text box Pin
bugDanny4-Oct-05 5:44
bugDanny4-Oct-05 5:44 
AnswerRe: Inserting text into text box Pin
bugDanny4-Oct-05 5:36
bugDanny4-Oct-05 5:36 
GeneralRe: Inserting text into text box Pin
si_694-Oct-05 5:42
si_694-Oct-05 5:42 
GeneralRe: Inserting text into text box Pin
bugDanny4-Oct-05 5:51
bugDanny4-Oct-05 5:51 
AnswerRe: Inserting text into text box Pin
David Crow4-Oct-05 8:29
David Crow4-Oct-05 8:29 
QuestionHow to get COM Variants International Pin
the_grip4-Oct-05 4:33
the_grip4-Oct-05 4:33 
QuestionTwo CPU's Pin
Richard Hudson4-Oct-05 4:12
Richard Hudson4-Oct-05 4:12 
AnswerRe: Two CPU's Pin
David Crow4-Oct-05 4:21
David Crow4-Oct-05 4:21 
GeneralRe: Two CPU's Pin
Richard Hudson4-Oct-05 4:43
Richard Hudson4-Oct-05 4:43 
AnswerRe: Two CPU's Pin
Bob Stanneveld4-Oct-05 7:44
Bob Stanneveld4-Oct-05 7:44 
AnswerRe: Two CPU's Pin
Blake V. Miller4-Oct-05 9:10
Blake V. Miller4-Oct-05 9:10 

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.