Board index » Visual Studio » Tooltip causes an ASSERT() in a child dialog box

Tooltip causes an ASSERT() in a child dialog box

Hello experts,
I already posted about my problem a couple of days ago, but it's not
solved yet and I have some more details about it.
Using MS VC 6.0 and Vista.
I create a CTabCtrl control in a dialog box. For each tab, a child
dialog box contains a bunch of controls (CEdit, CComboBox...). I can
display tooltips for each control, no problem.
The problem is that when the cursor (I mean the mouse) leaves a
control, if it enters the tooltip area, I get an ASSERT() warning:
In WinCore.cpp
void CWnd::AssertValid() const
{
...
// should be a normal window
ASSERT(::IsWindow(m_hWnd));

...
}

This occurs only when the dialog boxes displayed in the tabs are CHILD
dialog boxes. If I choose "Overlapped" or "Popup", it works (but I
need a child dialog box).
What should I do to avoid this problem?
TXS
Phil
-
 

Re:Tooltip causes an ASSERT() in a child dialog box

Follow the assert backward through the callstack and see where/why that
assert is getting triggered.

I'm sorry but neither one of your post really has enough info to help solve
the problem.

Try recreating the problem in a small application and then post the code
here.

AliR.


"Phil" <pbruyant@yahoo.com>wrote in message
Quote
Hello experts,
I already posted about my problem a couple of days ago, but it's not
solved yet and I have some more details about it.
Using MS VC 6.0 and Vista.
I create a CTabCtrl control in a dialog box. For each tab, a child
dialog box contains a bunch of controls (CEdit, CComboBox...). I can
display tooltips for each control, no problem.
The problem is that when the cursor (I mean the mouse) leaves a
control, if it enters the tooltip area, I get an ASSERT() warning:
In WinCore.cpp
void CWnd::AssertValid() const
{
...
// should be a normal window
ASSERT(::IsWindow(m_hWnd));

...
}

This occurs only when the dialog boxes displayed in the tabs are CHILD
dialog boxes. If I choose "Overlapped" or "Popup", it works (but I
need a child dialog box).
What should I do to avoid this problem?
TXS
Phil


-

Re:Tooltip causes an ASSERT() in a child dialog box

Quote
Using MS VC 6.0 and Vista.
I create a CTabCtrl control in a dialog box. For each tab, a child
dialog box contains a bunch of controls (CEdit, CComboBox...). I can
display tooltips for each control, no problem.
The problem is that when the cursor (I mean the mouse) leaves a
control, if it enters the tooltip area, I get an ASSERT() warning:
In WinCore.cpp

Phil,

I don't know if your situation matches my memory, but I vaguely recall
a benign ASSERT with tooltips with some version of VC (It may have
been 6, I can't be sure).

What happens in a release build - is there any apparent problem or
not?

Dave
-

Re:Tooltip causes an ASSERT() in a child dialog box

On 11 avr, 23:19, David Lowndes <Dav...@example.invalid>wrote:
Quote
Using MS VC 6.0 and Vista.
I create a CTabCtrl control in a dialog box. For each tab, a child
dialog box contains a bunch of controls (CEdit, CComboBox...). I can
display tooltips for each control, no problem.
The problem is that when the cursor (I mean the mouse) leaves a
control, if it enters the tooltip area, I get an ASSERT() warning:
In WinCore.cpp

Phil,

I don't know if your situation matches my memory, but I vaguely recall
a benign ASSERT with tooltips with some version of VC (It may have
been 6, I can't be sure).

What happens in a release build - is there any apparent problem or
not?

Dave

Thanks Dave.
It works in release build.
If the dialog box resource containg the CTabCtrl is "overlapped"
instead of "pop-up",
no ASSERT() is triggered. I give up for now, and I will go with an
overlapped dialog for now
(BTW I don't see any difference between an "overlapped" and a "pop-up"
dialog box).
I've tried to reproduce the problem in a smaller app, but I couldn't !
Thanks
Phil
-

Re:Tooltip causes an ASSERT() in a child dialog box

Quote
It works in release build.

OK that fits my vague recollection. I can't remember whether it was
fixed in a service pack or a newer version of VS.

Quote
If the dialog box resource containg the CTabCtrl is "overlapped"
instead of "pop-up",
no ASSERT() is triggered. I give up for now, and I will go with an
overlapped dialog for now
(BTW I don't see any difference between an "overlapped" and a "pop-up"
dialog box).

The OS tooltips are a pita - it's often easier to roll your own rather
than work out why the OS tooltips don't work in some circumstance!

Dave
-

Re:Tooltip causes an ASSERT() in a child dialog box

David Lowndes wrote:
Quote
The OS tooltips are a pita - it's often easier to roll your own rather
than work out why the OS tooltips don't work in some circumstance!


Dave:

Interestingly, I used HTML Help popups in one of my applications, and I saw an
ASSERT like this occasionally in debug build. In release build it was fine.

--
David Wilkinson
Visual C++ MVP
-