 |
|
 |
I'm trying to use the Tooltips for Menu Item class from venu8000. I can see by ATLTRACE2 messages that its getting the messages from the menus and has the correct strings from the string source, but no tooltips pop up. I'm using it with the mainframe not a dialog. Any help?
|
|
|
|
 |
|
 |
I have tried independently of this code and using this code to get popup menu item tooltips to work with no success on VS2008 under Vista. Running the EXE in the ZIP for this article works but after rebulding under VS2008 the resultant EXE does not! All you see is a slight pause and busy cursor as if the code was about to pop up the tooltip but nothing happens. I have followed the SendMessage of TTM_TRACKACTIVATE in debug and it goes off just fine!
I have tooltips working on dialogs but not for menu items.
Any help appreciated!
Cheers
Dave
|
|
|
|
 |
|
 |
Did you ever solve this tooltip problem? I haven't gotten it to work either under VS2008.
|
|
|
|
 |
|
 |
I had the same problem with BCG. To support customization it does not use standard menus and their menus do not send WM_MENUSELECT.
With MFC9 feature pack this code is now part of MFC and probably has the same problem.
Andrew Phillips
http://www.hexedit.com
andrew @ hexedit.com
|
|
|
|
 |
|
 |
I found the answer - just call CMFCPopupMenu::SetSendMenuSelectMsg() at the start.
BCG added support for WM_MENUSELECT to their menus in 6.50 (2005) but you had to call the above static method
(called CBCGPopupMenu::SetSendMenuSelectMsg at the time) to enable it.
I believe they added it after I complained about it since I needed to use it in HexEdit (see http://www.hexedit.com).
Andrew Phillips
http://www.hexedit.com
andrew @ hexedit.com
|
|
|
|
 |
|
 |
Hi,
Thanks for the info. It looks like CMFCPopupMenu is available for VS2010 so it doesn't help me now, but thanks anyway.
Darryl
|
|
|
|
 |
|
 |
I thought the problem was with the new version of MFC (ie MFC9 and later) which include CMFCPopupMenu.
As I understand it, after the BCG code was incorporated into MFC (in VS2008 feature pack) the WM_MENUSELECT stopped working because BCG used there own menubar (to support various things that standard menus can't do). After I complained that their menubar did not support WM_MENUSELECT in ~2004 they added support but only after you call CMFCPopupMenu::SetSendMenuSelectMsg().
So either:
- you are using VS2008 + feature pack or VS2010 and should call CMFCPopupMenu::SetSendMenuSelectMsg().
- you are using an earlier version of MFC which uses standard menus and WM_MENUSELECT should work.
Andrew Phillips
http://www.hexedit.com
andrew @ hexedit.com
|
|
|
|
 |
|
 |
Do you know if you can download the VS2010 MFC classes for free somehow? Is it in the SDK?
|
|
|
|
 |
|
 |
If you have VS2010 then you have MFC10 which has the classes.
If you have VS2008 you need to download and install the MFC feature pack.
It would be difficult to use the new MFC with VS2005 or earlier.
Andrew Phillips
http://www.hexedit.com
andrew @ hexedit.com
|
|
|
|
 |
|
 |
I have the 2008 feature pk. installed now, but I can't find any ref. in searches to any CMFC class. Again when I search for CMFC on-line it calls up VS2010. How did you get CMFC working with VS2008?
|
|
|
|
 |
|
 |
I am not sure if you are talking about searches in the MFC source code or searches in the help. If you have the feature pack installed there should be some extra project wizards that allow you to create MFC projects that use the new features. The MFC source code should also be present (I think under ATLMFC\source?). There are also many sample applications under the samples folder.
If you are talking about the help then the feature pack does not seem to add anything to the VS2008 help files. In fact even with VS2010 the help is very incomplete. I usually search on-line and end up at MS help for MFC10. Note that there is not a big difference between MFC9 (VS2008 feature pack) and MFC10 (VS2010) so you should be able to use the doco for that.
> How did you get CMFC working with VS2008?
It was a while ago but I don't recall any problems as long as you follow the instructions. I seem to recall something about installing the faeture pack before any service packs.
Andrew Phillips
http://www.hexedit.com
andrew @ hexedit.com
|
|
|
|
 |
|
 |
I tried calling CMFCPopupMenu::SetSendMenuSelectMsg() from my CMainFrame::OnCreate, and also from CMenuToolTip::Create, but the Venu class still isn't displaying menu tooltips. Did you get it working with the Venu code or did you re-implement it with the CMFC classes somehow? If the venu code, where did you make the call to SetSendMenuSelectMsg().
Thanks,
Darryl
|
|
|
|
 |
|
 |
Solution given is not working on Microsoft Visula Studio .NET 2003 envirnoment. Tooltip of menu item is not displayed when you run project on Microsoft visula Studio .NET 2003.
|
|
|
|
 |
|
 |
I built it with VC6, it's no problem, but when I built it with VS2005, no tooltips displayed, can you help me?
|
|
|
|
 |
|
 |
which OnmenueSelect do i need to override.
i dont use a common dialog as my menu is in CmainFrame, however when i tried to override OnmenueSelect of CmainFrame i placed a messageBox and it was never called
|
|
|
|
 |
|
 |
I'm very soorry because my english is to bad.
Tooltips for menu item is excelent, but it's failure when i use XP themes.
It runs well when i don't use manifest file ( myapp.exe.manifest), but when i use, no tooltip is displayed!!!
Can't you tell me the way to solve this problem??
thanks very much
|
|
|
|
 |
|
 |
Manifests, I presume, add XP visual styles ( themes are used mistakenly, it is a visual style that you apply ) to common controls like button, editbox etc. Is this tooltip an owner drawn one? If so, then you may have to render the style by yourself, either using some wrapper class for UXTheme.h( there are many on the web ) or use Uxtheme.h in your application and create typedef functions for these theme functions like DrawThemeBackground, DrawThemeText, etc. I have faced such problems while using XP visual styles for owner-drawn controls. Try such a way and maybe you will get through.
|
|
|
|
 |
|
 |
If a menu item is on the far right side of the monitor, the tip displays off screen!
|
|
|
|
 |
|
 |
I'm try show tooltip for the second and third submenu in your demo. But a tooltip was shown in the incorrect place.
Best regards,
Eugene Pustovoyt
|
|
|
|
 |
|
 |
Yes that has been fixed by replacing one parm for GetMenuItemRect.
Here is the fix:
Loom for GetMenuItemRect(hParent,..)
and replace with
GetMenuItemRect(NULL,..)
This should fix the problem.
Thanks
|
|
|
|
 |
|
 |
It doesn't work for a context menu.I mean when you right-click and track popup menu
|
|
|
|
 |
|
 |
Simple, and to the point!
Keep up the good work, and you'll do better on your next article.
Good job.
William
Fortes in fide et opere!
|
|
|
|
 |
|
|
 |
|
 |
> Man dont discover fresh water!
What's wrong with discovering fresh water?!? I guess you mean don't reinvent the wheel.
Anyway thanks for the pointer to the di Lascia code. I found it very useful!!
I couldn't get the venu8000's example project to display the tips in debug builds (under VC7). (The release version works though.)
However, I need the debug version as I am making major chnages (dynamic tips that change at run-time). I will be using the Paul di Lascia code since it works in debug on VC7.
Andrew Phillips
aphillips @ expertcomsoft.com
|
|
|
|
 |
|
 |
You wrote:
Simple and best way to add tooltips to the menu items
Quite a claim! You need to justify this if you want people to take you seriously.
You wrote:
My helper class will take care of everything else from there
I think I am not alone in saying this: on Code Project visitors want to know what your helper class does and how it works. That kind of thing just makes your article more interesting and gives you credibility.
I am not going to download and use your code unless your article convinces me to do so.
|
|
|
|
 |