Unable to display RTF tooltips greater 80 chars |
Post Reply |
Author | |
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
Posted: 24 May 2007 at 6:16pm |
Hi;
I found a serious problem with CXTPToolTipContextToolTip::GetToolText() in conjunction with RTF tooltip windows - I didn't check it with the other tooltip types.
I tried to assign a longer RTF text to the tooltip window in the TTN_NEEDTEXT message handler by setting the lpszText member of the NMTTDISPINFO structure, but no tooltip window ever appeared. So after hours of debugging I broke down the problem to the CXTPToolTipContextToolTip::GetToolText() function. This function only takes the szText member of the NMTTDISPINFO structure to get the text. This is not according to the MS documentation about TTN_NEEDTEXT messages.
Since the GetToolText() function is not virtual, I'm unable to fix it without changing the code. Perhaps the guys at codejock will take this into account while working on the next maintenance release.
|
|
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Thanks, please patch sources now:
tt.szText[0] = _T('\0');
tt.lpszText = tt.szText; GetOwner()->SendMessage(WM_NOTIFY, id, (LPARAM)&tt);
lpToolInfo->strCaption = tt.lpszText;
Same changes will be done for 11.2 release.
Thank you
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
Hi Oleg;
could you give me a hint, where to apply the patch?
|
|
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
In XTPToolTipContext.cpp.
Replace whole method:
CString CXTPToolTipContextToolTip::GetToolText(TOOLITEM* lpToolInfo)
{ if (lpToolInfo->bAutoCaption) { UINT_PTR id = lpToolInfo->uId; TOOLTIPTEXT tt = {0}; tt.hdr.hwndFrom = m_hWnd; tt.hdr.idFrom = lpToolInfo->uId; tt.hdr.code = TTN_NEEDTEXT; tt.uFlags = lpToolInfo->uFlags; tt.hinst = NULL; tt.szText[0] = _T('\0');
tt.lpszText = tt.szText; GetOwner()->SendMessage(WM_NOTIFY, id, (LPARAM)&tt);
lpToolInfo->strCaption = tt.lpszText;
if ((m_pContext->GetControlStyle() & TTS_NOPREFIX) == 0)
{ CXTPDrawHelpers::StripMnemonics(lpToolInfo->strCaption); } lpToolInfo->bAutoCaption = FALSE;
} return lpToolInfo->strCaption;
} |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |