![]() |
HOW TO: Render XAML markup into a device context |
Post Reply
|
| Author | |
MacW
Senior Member
Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Quote Reply
Topic: HOW TO: Render XAML markup into a device contextPosted: 26 May 2008 at 10:14am |
|
Hi,
is there a way to render markup into an arbitrary device context? Without the need to use one of the markup-enabled XTP Controls I mean? I see that some of your samples use a CXTPMarkupContext class, but there is no documentation for this class anywhere. I know XTP documentation is sparse, but there is absolutely nothing on this class, or the promised "render" function which allows me to render markup into a DC. Any help appreciated. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 May 2008 at 10:25am |
|
Hi,
Here small sample:
CXTPMarkupContext* pMarkupContext = XTPMarkupCreateContext();
CXTPMarkupUIElement* pMarkupUIElement = XTPMarkupParseText(pMarkupContext , lpszCaption);
// Optional
XTPMarkupSetDefaultFont(pMarkupContext (HFONT)pFont->GetSafeHandle(), pDC->GetTextColor());
XTPMarkupRenderElement(pMarkupUIElement, pDC->GetSafeHdc(), rcText);
XTPMarkupReleaseElement(pMarkupUIElement);
XTPMarkupReleaseContext(pMarkupContext);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
MacW
Senior Member
Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 May 2008 at 9:50am |
|
Thanks, Oleg.
This worked! Support for XAML is a very valuable addition to XTP. |
|
![]() |
|
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 |