?
Solved

How to set a tooltip's delay time?

Posted on 2000-03-09
3
Medium Priority
?
859 Views
Last Modified: 2013-11-20
Hi,all experts.
I have a dialog with some buttons.I want the tooltip of the buttons can still appear until mouse moves out.So I want to write the code like this:
      ::SendMessage(m_hWnd, TTM_SETDELAYTIME,TTDT_AUTOPOP, MAKELPARAM(30000, 0));
But how can I get m_hWnd of the tooltip window?
0
Comment
Question by:wang_gh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:mahno
ID: 2603919
Try GetSafeHwnd()
0
 
LVL 31

Accepted Solution

by:
Zoppo earned 200 total points
ID: 2604026
Hi wang_gh,

you can try following:

handle the TTN_SHOW notification like this:

// in h file
class CMyDialog : public CDialog
{
 ...
 afx_msg void OnShowToolTip( UINT id, NMHDR* pNotifyStruct, LRESULT* result );
 ...
};

// in cpp file
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
....
 ON_NOTIFY_EX_RANGE( TTN_SHOW, 0, 0xFFFF, OnShowToolTip )
....
END_MESSAGE_MAP()
void
CMyDialog::OnShowToolTip( UINT id, NMHDR* pNotifyStruct, LRESULT* result )
{
 ::SendMessage( pNotifyStruct->hwndFrom, TTM_SETDELAYTIME, ... );
}

hope that helps,

ZOPPO
0
 

Author Comment

by:wang_gh
ID: 2605239
But the longest time is 30 seconds.Can I change it to unlimited?
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question