Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Markup & error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Markup & error

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Markup & error
    Posted: 08 October 2010 at 5:33am
XTP 13.4.1. Using CMarkupStatic. Consider this:
 
m_static.EnableMarkup();
// m_static.SetWindowText("<TextBlock>&Close</TextBlock>"); <-- yields xml error...
m_static.SetWindowText("<TextBlock>&amp;Close</TextBlock>"); // xml ok :)
 
That sets the text to "&Close". ALT+C works, but the ampersand should not be there! For a static control you need "&&Close" to make ampersand visible!
 
Any ideas?
PokerMemento - http://www.pokermemento.com/
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: 08 October 2010 at 6:58am
Hi,

How markup have to determine that you use it in static and don't want show "&" ? :-)

Try this
<TextBlock><Underline>C</Underline>lose</TextBlock>
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2010 at 9:55am
Underline is a good thing! :) But will ALT+C work here?
PokerMemento - http://www.pokermemento.com/
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: 08 October 2010 at 1:11pm
Hi,

You can always call CWnd::SetWindowText("&Close") to notidy system that you want Alt+C but use Markup text to draw it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2010 at 1:59pm
Thanks. Will give it a shot!
PokerMemento - http://www.pokermemento.com/
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.172 seconds.