Click here to Skip to main content
15,902,741 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: need help in c++ inheritance.. Pin
ThatsAlok16-May-07 19:57
ThatsAlok16-May-07 19:57 
QuestionProblem with opening a document which is allready open in automation? Pin
Banks K6-May-07 22:25
Banks K6-May-07 22:25 
Questiononsize() flickering issue Pin
nathan76-May-07 22:16
nathan76-May-07 22:16 
AnswerRe: onsize() flickering issue Pin
baerten6-May-07 22:35
baerten6-May-07 22:35 
GeneralRe: onsize() flickering issue Pin
nathan76-May-07 23:34
nathan76-May-07 23:34 
GeneralRe: onsize() flickering issue Pin
baerten7-May-07 0:05
baerten7-May-07 0:05 
AnswerRe: onsize() flickering issue Pin
ThatsAlok16-May-07 19:56
ThatsAlok16-May-07 19:56 
QuestionTooltip text in CFormView Pin
ledallam6-May-07 22:04
ledallam6-May-07 22:04 
Hi
I am trying to display tool tip text on icons placed on CFormView. I am using these functions:
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipText)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipText)

BOOL CDashboardView :: OnToolTipText (UINT id,
NMHDR *pNMHDR,
LRESULT *pResult)
{

BOOL result = TRUE; /* Operation result */
CString strTipText; /* tool tip text */
UINT nID = -1; /* Identifier */

TOOLTIPTEXTA* pTTTA = NULL;
TOOLTIPTEXTW* pTTTW = NULL;

CPoint point; /* current cursor point */

pTTTA = (TOOLTIPTEXTA*)pNMHDR;
pTTTW = (TOOLTIPTEXTW*)pNMHDR;

nID = pNMHDR->idFrom;

if (nID != 0 )
{
// Identify button rect, copy text
for (long ii = 0; ii < m_arrLineupBtnRect.GetSize(); ii++)
{

GetCursorPos (&point);
ScreenToClient (&point);
if (m_arrLineupBtnRect[ii].PtInRect(point))
{

strTipText = m_sButtLineups[ii].m_strToolTip;


}
}

// Copy tool tip text
if (pNMHDR->code == TTN_NEEDTEXTA)
{
lstrcpyn(pTTTA->szText, strTipText, strTipText.GetLength());

}
else
{

_mbstowcsz(pTTTW->szText, strTipText,strTipText.GetLength());

}

*pResult = 0;

}

return result;

}

My problem is that the tool tip text has about 280characters. The program crashes at the line lstrcpyn(pTTTA->szText, strTipText, strTipText.GetLength()); It works fine for about 80 characters in tool tip text.

Is there any limit for the tool tip text.

Thanks
Madhavi
AnswerRe: Tooltip text in CFormView Pin
Hamid_RT7-May-07 8:57
Hamid_RT7-May-07 8:57 
Questionabout Parallel Port Pin
mt_samiei6-May-07 22:00
mt_samiei6-May-07 22:00 
AnswerRe: about Parallel Port Pin
JudyL_MD7-May-07 3:15
JudyL_MD7-May-07 3:15 
QuestionGetDCEx always returns NULL Pin
Kier Dugan6-May-07 21:54
Kier Dugan6-May-07 21:54 
AnswerRe: GetDCEx always returns NULL PinPopular
Hans Dietrich8-May-07 3:41
mentorHans Dietrich8-May-07 3:41 
QuestionAPI to remove temporary internet files Pin
Mushtaque Nizamani6-May-07 21:48
Mushtaque Nizamani6-May-07 21:48 
AnswerRe: API to remove temporary internet files Pin
_AnsHUMAN_ 6-May-07 22:02
_AnsHUMAN_ 6-May-07 22:02 
QuestionDraw textboxes with double buffering Pin
baerten6-May-07 21:36
baerten6-May-07 21:36 
QuestionRe: Draw textboxes with double buffering Pin
Hamid_RT7-May-07 8:49
Hamid_RT7-May-07 8:49 
AnswerRe: Draw textboxes with double buffering Pin
baerten7-May-07 20:40
baerten7-May-07 20:40 
QuestionHow to move to previous statement in VC++ Debugging editor Pin
vc++_fragrance6-May-07 21:27
vc++_fragrance6-May-07 21:27 
AnswerRe: How to move to previous statement in VC++ Debugging editor Pin
_AnsHUMAN_ 6-May-07 21:30
_AnsHUMAN_ 6-May-07 21:30 
GeneralRe: How to move to previous statement in VC++ Debugging editor Pin
vc++_fragrance8-May-07 3:24
vc++_fragrance8-May-07 3:24 
QuestionDownloading a file Pin
_AnsHUMAN_ 6-May-07 21:24
_AnsHUMAN_ 6-May-07 21:24 
QuestionHow to check if a file is blocked in properties - security section Pin
sp_ranjan6-May-07 21:10
sp_ranjan6-May-07 21:10 
Questionconnection problem Pin
p_6-May-07 20:57
p_6-May-07 20:57 
AnswerRe: connection problem Pin
Hamid_RT7-May-07 8:48
Hamid_RT7-May-07 8:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.