Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - In markup,how to output a string variable?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

In markup,how to output a string variable?

 Post Reply Post Reply
Author
Message
nihaohhh View Drop Down
Newbie
Newbie


Joined: 09 June 2008
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote nihaohhh Quote  Post ReplyReply Direct Link To This Post 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.

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.