Solved

ToolTips on  Popup Menus

Posted on 1998-01-08
2
587 Views
Last Modified: 2013-11-20
I need to display a ToolTip on a CMenu popup menu.  I can get the tip text but the CToolTipCtrl needs a parent window and the CMenu is not derived form a CWnd. I tried the MainFrame window but this forces the popup menu to disappear right after it comes up.  Any other suggestions?
0
Comment
Question by:traott
2 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 100 total points
ID: 1313638
When you selct menu item in popup menu WM_MENUSELECT message is sent to menu owner window. You can use GetCursorPos Win32 API function to get current cursor position and then WindowFromPoint to get menu temporary window handle beneith the mouse pointer. Now you can create tooltip control passing this temporary window handle as owner window, add tool and acticvate it.
0
 

Expert Comment

by:allanephillips
ID: 39035499
I would like to see what the code looks like in this OnMenuSelect() method.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ffmpeg - "rtsp://...... Operation not permitted" 4 87
has22 challenge 11 106
Fibonacci challenge 11 136
Problem to open Excel file 15 210
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.

679 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