Код: Выделить всё
void CDoDlg::InizializzaToolTip(void)
{
CString strToolTip; ///< Stringa da mostrare.
if (m_ToolTip1.Create(this) == FALSE)
{
AfxMessageBox(strToolTip, MB_ICONERROR);
}
else
{
m_bTTIniz = true;
strToolTip.LoadString(IDS_STRING119); //[ITA] Click per aprire una nuova fustella.
m_ToolTip1.AddTool(&m_button, strToolTip);
m_ToolTip1.Activate(TRUE);
}
}
BOOL CDoDlg::PreTranslateMessage(MSG* pMsg)
{
if (m_bClose == false)
{
m_ToolTip1.RelayEvent(pMsg);
}
return CDialogEx::PreTranslateMessage(pMsg);
}
< /code>
, а затем: < /p>
CDoDlg::~CDoDlg()
{
if (m_pArt)
delete m_pArt;
if (m_pImageList)
m_pImageList->DeleteImageList();
m_ToolTip1.DestroyWindow();
}
< /code>
И у меня есть утечки памяти, и я не знаю, как я могу ее решить: < /p>
Detected memory leaks!
Dumping objects ->
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(156) : {25320} normal block at 0x0FD24F48, 26 bytes long.
Data: < %mP > B0 25 6D 50 04 00 00 00 04 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {25319} normal block at 0x0FDE9978, 168 bytes long.
Data: < $5b> 00 00 00 00 CD CD CD CD 00 00 00 00 A5 24 35 62
Подробнее здесь: https://stackoverflow.com/questions/791 ... ooltipctrl