BUG: XTPMarkupStatic unusable |
Post Reply |
Author | ||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
Posted: 15 December 2011 at 3:12pm |
|
Hi;
Since v15.2.1 the CTPMarkupStatic control is unusable if the markup text contains a % (percent) sign. I found no breaking change news in readme of this version about this kind of annoying error. This code change required several working hours to be located and fixed by creating our own control!!!! Taken a look at the code change I found out that the % sign is used as a splitter for caption/text combination. Old code:
New code:
To CJ: It would be better to create a new function "SetMarkupTextEx" to extend the functionalities for your needs. In any case, if you leave the code as is, the control is unusable in real world applications! |
||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
|
For next release we did as you suggested and reverted SetMarkupText and added SetMarkupTextEx for the ribbon (note if you used this in backstage you now need to update the code).
|
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
|
Sounds good!
Thanks |
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
jimmy
Senior Member Joined: 11 November 2003 Location: Austria Status: Offline Points: 515 |
Post Options
Thanks(0)
|
|
Hello,
i think, that the correct way is to check for %s not only for %. or check direct for lpszMarkup == "%s" or using strstr(..., "%s" ) Jimmy |
||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
|
What if they want to display %s?
|
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
|
Hi;
IMHO the string passed to SetMarkupText() should not contain any string formatting code (e.g. %f, %s, %ld, ...)! It should be plain XAML - and nothing else. |
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
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 |