Bug - CalendarDemo, custom tooltip |
Post Reply |
Author | |
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
Posted: 04 June 2009 at 10:18pm |
I think this has been around for some time, but thought I'd point it out.
Find in CalendarDemoView. INT_PTR CXTPCalendarControl_Custom::OnToolHitTest(CPoint point, TOOLINFO* pTI) const This will cause a crash in unicode: int nBuffSize = strToolText.GetLength()*2 +10; TCHAR* pBuffer = (TCHAR*)malloc(nBuffSize); STRCPY_S(pBuffer, nBuffSize, (LPCTSTR)strToolText); pTI->lpszText = pBuffer; I did a quick fix as follows: int nBuffSize = strToolText.GetLength() +10; TCHAR* pBuffer = (TCHAR*)calloc(nBuffSize,sizeof (TCHAR)); STRCPY_S(pBuffer, nBuffSize, (LPCTSTR)strToolText); pTI->lpszText = pBuffer; I found custom tooltips much easier to implement by editing the source rather than using a custom control anyhow. |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Sure - this is very juniour task. But in 13.1 this is public member of CXTPCalendarControl CString m_sCustomFormat4Tooltip; //Free-styled tooltip tag-based way to fill tooltip string //used tags <BODY>,<LOC>,<SUBJ>,<TIME> in any combination and order and with any fillers |
|
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 |