Best way to debug CTooltipCtrl not showing the tip

"o_magen1" <o_magen1-/[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
Hello All

This is a weird scenario which I cannot understand and I'm looking for a way to debug this and figure it out.

The app is an IE plugin, which is consisted of a BHO and a toolbar. I have a class that inherits from CStatic and extends its functionality as so:

class CMyStatic : public CWindowImpl< CMyStatic , CStatic >
{
   ...
   CToolTipCtrl m_tip;
};

I create the tooltip as so:

        if ( !m_tip.IsWindow() )
        {
            // create a tool tip
            DWORD dwStyle = WS_POPUP | TTS_NOANIMATE | TTS_NOFADE | TTS_NOPREFIX;
            m_tip.Create( m_hWnd, NULL, NULL, dwStyle );
            if ( m_tip.IsWindow() )
            {
                m_tip.Activate( TRUE );
                m_tip.AddTool( m_hWnd, lpszString );
            }
        }

and in response to the mouse events i relay the event:

//MESSAGE_RANGE_HANDLER( WM_MOUSEFIRST, WM_MOUSELAST, OnMouseMessage )

LRESULT CMyStatic::OnMouseMessage( UINT uMsg, WPARAM wParam, LPARAM lParam,BOOL& bHandled )
{
    MSG msg =
    {
      m_hWnd, uMsg, wParam, lParam
    };
    if ( m_tip.IsWindow() )
    {
        m_tip.RelayEvent( &msg );
    }

    bHandled = FALSE;
    return 1;
}

The weirdness comes from the simple fact that i'm using this exact same class (CMyStatic that is) with a different app (an IE infoband) and the tooltip works as expected, on different CStatic controls that I subclass the same exact way as in the other app).

I have no idea why this isn't working - m_tip is a valid window, RelayEvent(..) does get called .. but no tootip is shown.

Any help on how to figure this out would be appreciated.



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.