![]() |
In markup,how to output a string variable? |
Post Reply
|
| Author | |
nihaohhh
Newbie
Joined: 09 June 2008 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Topic: In markup,how to output a string variable?Posted: 20 June 2008 at 12:11am |
|
Hello,
There is two problem.
1.The code below?
CString str=10000;
CXTPControlMarkupLabel* pLabel = new CXTPControlMarkupLabel();
pGroup->Add(pLabel, 0);
pLabel->SetCaption(
_T("<TextBlock FontSize='17'><Bold>10000</Bold></TextBlock>"));
I want to replace the string "10000" with the variable str.How can I write the code?
2.I want to add the character in ascii chart 2 to the markup text .How to do it?
Thanks a lot.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 June 2008 at 1:34am |
|
Just format string before set caption;
CString strMarkup; strMarkup.Format(_T("<TextBlock FontSize='17'><Bold>%s</Bold></TextBlock>"), str);
pLabel->SetCaption(strMarkup);
2. try &#XX;
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |