Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - [solved] v17 BUG Text clipped MarkUp
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[solved] v17 BUG Text clipped MarkUp

 Post Reply Post Reply
Author
Message
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Topic: [solved] v17 BUG Text clipped MarkUp
    Posted: 09 January 2016 at 1:29pm
Hi,

congrats to the new release. Surely a lot of work was put into that.

Unfortunately, after installing the final version, it tool only 5 seconds to find the first bug:

I use task dialogs with XAML markup. In the new version, text is clipped in the middle of the sentence, the Verify check boxes are clpped in the middle of the sentence etc. I cannot ship my software with this bug, please respond swiftly.

The text clipped is:

<TextBlock TextWrapping='Wrap'>Reset only the options in this dialog.</TextBlock>

while the text

<TextBlock TextWrapping='Wrap'>Reset the options in this dialog and also all custom data settings I made for individual file formats.</TextBlock>

is displayed correctly. See:



The text in the upper row should read "Reset the options in this dialog."

Here is an example with a clipped Verify check box: It should read "Don't show this message again".

This problem is new to version 17.




The screen shots were taken on a standard 4K monitor with 3940 pixels horizontal resolution at 150% font-size scaling (Windows) and 144 DPI.

Please advice, I need to ship on Tuesday.

Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2016 at 10:39am
Maybe this is related to clipped text in Task Dialogs (see my other post).

Version 17 clips text output in tool tips. The width is apparently calculated correct, but the text is clipped somewhere in the middle:



Please advice soonest.

Windows 10 64-bit. 4K monitor with 3940 pixel and 144 DPI.
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 12 January 2016 at 9:20am
I have found out that this seems to be related to how you manage DPI awareness in your toolkit.

The CXTPDpi::Init() method gets called very early, by some static variables you fill.

You call GetDC(NULL) and calculate the screen DPI as 96.
But the monitor is actually using 144 DPI.

After I figured that, I placed a call to

XTPDpiHelper()->Invalidate();

in the constructor of CMainFrame. This causes the method

CXTPDpi::Init()

to be called again. And this time, the DC returned by GetDC(NULL) returns the correct 144 DPI. Seems to be a side-effect of XTP or MFC initialization.

This solves the problem with the clipped "Verify" texts in Task dialogs, but not the other problems.
The problem with the clipped text in tooltips is also not affected by this change.

I had so far no feedback on these issues.
I'm already preparing plan B, going back to XTP version 16. Too many issues with the 17 release, sorry.

Back to Top
iamgtd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 February 2009
Status: Offline
Points: 131
Post Options Post Options   Thanks (1) Thanks(1)   Quote iamgtd Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2016 at 5:23am
Since the update to V 17.0 the xaml caption of a backstagebutton is truncated. That means from a text with several words the last word isn't shown. If one character is added to the last word, the caption will be shown correctly. Not every text is concerned, we using on other backstagebuttons shorter and also longer captions without this problem.

I have created a sample which shows this behaviour. The labels above the buttons shows the text for the caption. You can see that on Test1 and Test3 the captions are truncated. On buttons 3 and 4 all letters are replaced by numbers.



uploads/4998/TestCodejockBackstageButton.zip
---------

OS: Win 10 64 bit

Codejock Version 22.1 ActiveX

MS Visual Studio 2022 - C#

---------
Back to Top
iamgtd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 February 2009
Status: Offline
Points: 131
Post Options Post Options   Thanks (0) Thanks(0)   Quote iamgtd Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2016 at 3:39am
The issue with truncated caption on backstagebuttons isn't fixed with v17.2
---------

OS: Win 10 64 bit

Codejock Version 22.1 ActiveX

MS Visual Studio 2022 - C#

---------
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2016 at 5:14am
Hello iamgtd,
Your sample is very helpful, but I can't find reason and solution yet.
I found svn revision where bug was introduced, but  that was branch merging with a lot of changes in markup.
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 23 April 2016 at 3:16am
Just installed version 17.2.0.
This problem is not fixed.

The  task dialog still renders only

"Reset only the options in this"

when using

<TextBlock TextWrapping='Wrap'>Reset only the options in this dialog.</TextBlock>

as the source.


Monitor with 144 DPI setting, Windows 10.

Back to Top
agontarenko View Drop Down
Admin Group
Admin Group


Joined: 25 March 2016
Status: Offline
Points: 299
Post Options Post Options   Thanks (1) Thanks(1)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 2016 at 2:42am
Hello All,

I'm glad to inform you that the issue has been fixed. The fix will be available in the next beta or final release.

as hot fix you can change method CXTPMarkupGdiPlusDeviceContext::MeasureString  in file Source/Markup/DeviceContext/XTPMarkupGdiPlusDeviceContext.cpp.
Just delete ceil() calls
  sz.cx = static_cast<int>(rc.Width);
  sz.cy = static_cast<int>(rc.Height);
Regards,
Artem Gontarenko
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2016 at 2:45am
Hi, Artem

I've made the patch, re-compiled XTP and the problem is gone.

Good job! Thank you very much. Smile

Back to Top
Marlon View Drop Down
Groupie
Groupie


Joined: 27 December 2011
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marlon Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2016 at 12:55pm
Originally posted by agontarenko agontarenko wrote:

Hello All,

I'm glad to inform you that the issue has been fixed. The fix will be available in the next beta or final release.
When it will be release?
Marlon



Product: Xtreme SuitePro (ActiveX) version 17.2.0

     Platform: Windows 10(64bit)
     Language: Access 2007 (VBA)

Back to Top
agontarenko View Drop Down
Admin Group
Admin Group


Joined: 25 March 2016
Status: Offline
Points: 299
Post Options Post Options   Thanks (0) Thanks(0)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2016 at 10:09am
Probably sometime mid July
Back to Top
Marlon View Drop Down
Groupie
Groupie


Joined: 27 December 2011
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marlon Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2016 at 3:25pm
Thanks
Marlon



Product: Xtreme SuitePro (ActiveX) version 17.2.0

     Platform: Windows 10(64bit)
     Language: Access 2007 (VBA)

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.191 seconds.