How to display a tip when the cursor moves into a pane ? 
Author Message
 How to display a tip when the cursor moves into a pane ?

How to display a tip, like the tooltips, when the cursor
moves into a pane of a spliiter window?
Thanks a lot!

Wenrich



Tue, 26 Apr 2005 04:26:43 GMT  
 How to display a tip when the cursor moves into a pane ?
Here, you have to derive a new class from CSplitterWnd
say cTipSplitterWnd. Then Add the following code in the
OnCreate function:

int CTipSplitterWnd::OnCreate(LPCREATESTRUCT
lpCreateStruct)
{
        if (CSplitterWnd::OnCreate(lpCreateStruct) == -1)
                return -1;

        EnableToolTips(TRUE);
        m_tip.Create(this);
        m_tip.AddTool(this, "My Tooltip Text!"); // Use
m_tip.UpdateTipText(...) to modify the tip text
        m_tip.Activate(TRUE);                  

        return 0;

Quote:
}

and PreTranslateMessage should be:

BOOL CTipSplitterWnd::PreTranslateMessage(MSG* pMsg)
{
        if (m_tip.GetSafeHwnd())
                m_tip.RelayEvent(pMsg);

        return CSplitterWnd::PreTranslateMessage(pMsg);

Quote:
}

Declare m_tip in the header file.

Hope this will help you.

Binoy

Quote:
>-----Original Message-----
>How to display a tip, like the tooltips, when the cursor
>moves into a pane of a spliiter window?
>Thanks a lot!

>Wenrich
>.



Tue, 26 Apr 2005 07:07:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Looking for method to show dynamically moving cursor over audio waveform display

2. Displaying information in right pane

3. Statusbar pane: Display a user defined message?

4. CStatus bar isn't displaying text in any pane other than 0

5. How do I move text cursor?

6. Move the mouse cursor by keyboard.

7. Moving cursor in C

8. Moving cursor location in Standard Out

9. moving the cursor oon screen

10. DataGrid: how to move cursor to a cell?

11. moving the cursor around the screen in linux

12. Newbie Question => moving cursor in dos-mode

 

 
Powered by phpBB® Forum Software