Click to See Complete Forum and Search --> : RE: Control to show Variable(s)


April 3rd, 1999, 01:20 PM
GetDlgItem(IDC_MYSTATIC)->SetWidnowText("Test");
Would '("Test")' be replaced with ("Value") ???? ..
ex... Dialog based program.. click this button and it increasses value X
by value Y... show the new varriable called Value...
??

Rangaraya
April 3rd, 1999, 03:45 PM
If I understand your question correctly, I think you are trying to display the value of a variable in a static text control. If so, you can do like this:

int x;
CString sVal;
// manipulate the value of x
sVal.Format("%d",x);

GetDlgItem(IDC_MYSTATIC)->SetWidnowText(sVal);

...

April 3rd, 1999, 03:49 PM
Yes, that is what I am trying do.. thank you!