Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Problem with blank images in markup text
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with blank images in markup text

 Post Reply Post Reply
Author
Message
maxxan View Drop Down
Groupie
Groupie


Joined: 15 July 2009
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote maxxan Quote  Post ReplyReply Direct Link To This Post Topic: Problem with blank images in markup text
    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!

Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post 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
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.141 seconds.