![]() |
Unable to display RTF tooltips greater 80 chars |
Post Reply ![]() |
Author | |
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1201 |
![]() ![]() ![]() ![]() ![]() 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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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: 1201 |
![]() ![]() ![]() ![]() ![]() |
Hi Oleg;
could you give me a hint, where to apply the patch?
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |