Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - [solved] Clipped text in TaskDialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[solved] Clipped text in TaskDialog

 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] Clipped text in TaskDialog
    Posted: 15 September 2016 at 5:08am
Hi,

I use the latest XTP.

When I use a CXTPTaskDialog with a verify  (SetVerificationText) the text is clipped when the dialog is configured to use markup via EnableMarkup.

The problem is independent from whether or not I wrap the verify text in a <TextBlock> or not. What helps is to add a few extra blanks to the end, so this seems to be one of the wrong width calculations again.

Text should read: "Apply to all"



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: 15 September 2016 at 12:34pm
Hello,

It is very very similar to this issue. I suppose you forgot make changes in code.
Originally posted by MacW MacW wrote:

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


We expect version 17.3 with this fix in September.

Regards,
 Oleksandr Lebed
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: 18 September 2016 at 6:56am
No, this patch (remove ceil) is already applied. It still clips the verify string. This is how the method looks in my patched code:

SIZE CXTPMarkupGdiPlusDeviceContext::MeasureString(LPCWSTR lpszText, int nCount) const
{
    SIZE sz = { 0 };

    RectF rc;
    RectF layoutRect(0, 0, 0.0f, 0.0f);

    if (Gdiplus::Ok == m_pGdiPlus->GdipMeasureString(GetGraphics(),
        lpszText, nCount, AccessFont(), &layoutRect,
        m_pGpStringFormat, &rc, 0, 0))
    {

        sz.cx = static_cast<int>(rc.Width);
        sz.cy = static_cast<int>(rc.Height);
    }

    return sz;
}

Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (1) Thanks(1)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 12 December 2016 at 12:35pm
This problem seems to be fixed in the 17.3.
I don't could check all potential problem Task Dialogs yet, but so far things look shiny. Thanks!
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.145 seconds.