TooTipCtrl and CComboBox assert
Jim Volker -- jvolker@goodnet.com
Monday, July 15, 1996
WinNt40B2, VC4.1
I used Jeff Prosise's CMyToolTipCtrl class to add tool tips to four
controls located on a CFormView class. The first two controls are
from CEdit, the last two from CComboBox.
The program runs, and shows the tool tips fine. When exiting the program,
I receive an ASSERT from CWnd::DestroyWindow().
// Note that 'this' may have been deleted at this point.
if (bInPermanentMap)
{
// Should have been detached by OnNcDestroy
ASSERT(!pMap->LookupPermanent(hWndOrig, p));
}
The call stack shows this call comes from the CComboBox dtor.
Without adding tooltips to the CComboBox controls, there are no ASSERTS.
I am not sure what the 'perminanent map' is, or what should have been
detached in OnNcDestroy.
Any ideas?
David.Lowndes@bj.co.uk
Friday, July 19, 1996
>
The program runs, and shows the tool tips fine. When exiting the program,
I receive an ASSERT from CWnd::DestroyWindow().
// Note that 'this' may have been deleted at this point.
if (bInPermanentMap)
{
// Should have been detached by OnNcDestroy
ASSERT(!pMap->LookupPermanent(hWndOrig, p));
}
The call stack shows this call comes from the CComboBox dtor.
Without adding tooltips to the CComboBox controls, there are no ASSERTS.
I am not sure what the 'perminanent map' is, or what should have been
detached in OnNcDestroy.
<
I can't tell you what the problem is, but the permanent map is a data structure
that MFC maintains between your applications CWnd objects and the real
Windows HWNDs. These enable MFC to get a CWnd from a HWND, and
vice-versa. There are several other maps that MFC maintains to translate
between other types of SDK handles and MFC objects.
Dave Lowndes
| Вернуться в корень Архива
|