Print Page | Close Window

Problem with blank images in markup text

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23463
Printed Date: 29 April 2024 at 10:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with blank images in markup text
Posted By: maxxan
Subject: Problem with blank images in markup text
Date Posted: 10 October 2017 at 9:10am
Im using a CXTPMarkupStatic and setting an ImageManager to that one and the markup text. The problem is that when rendered, the space where the image shoud be have the correct size, but it's only blank, no image. I look in the code and it goes to render it as an icon.

I load the image with (png-file):
CXTPImageManagerIconHandle oIconHandle;
oIconHandle.Attach(CXTPImageManagerIcon::LoadBitmapFromResource(ghInstance, MAKEINTRESOURCE(IDB_IMAGE1), &bAlpha), FALSE); // I've also tried with Share handle = TRUE
pImageManager->SetIcon(oIconHandle, 1);  // Set image with ID 1
mMarkupControl.GetMarkupContext()->SetImageManager(pImageManager);

The markup looks something like and all the text is visible and spacing between is of the size of the image:
<StackPanel>
<TextBlock>Some text that I can see</TextBlock>
<Image Source='1'/>
<TextBlock>Some more text</TextBlock>
</StackPanel>

What could the problem be? Using version 18.0.1. 

Thanks!




Replies:
Posted By: Fredrik
Date Posted: 16 October 2017 at 5:29pm
The problem seems to be that you need a transparent pixel in bottom left corner... 

-------------
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net