0
votes

I have a SDI project with Feature Pack enabled. The program has a Menu Bar (CMFCMenuBar) and four Tool Bars(CMFCToolBar).

Toolbars works correctly: I assigned to the TB's buttons the ID of equivalent menu items and I see TB images on menu voices.

Now, when I hover on some menu voices (always the same) I got some random tooltips text, I say random because I searched my project and I don't have those two strings written in any part of my solution, for example:

Picture error 1 Picture error 2 Picture Error 3

I have recently done some manual modification in resource.h file scrumbling some ids... that might be a problem?

Also, I tried to fix the problem by telling Menu to not show tooltips:

dwStile = m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC/* | CBRS_TOOLTIPS*/ | CBRS_FLYBY;
m_wndMenuBar.SetPaneStyle(dwStile);

but, as you can see in the images above, I got no results at all.

Any idea where I can look for the error?

2
Check your ID values in resource.hVuVirt
@VuVirt What exactly should I look for?IssamTP
Overlapping ID values for instanceVuVirt
All the IDs are unque, already checked.IssamTP
Please check my answer, if you have any suggestions.IssamTP

2 Answers

0
votes

When you are in the Resource IDE you can specify what the popup text is:

The Prompt and Tooltip Text

In the above example I used:

Open dialogue to manage and modify talk assignments and various appointments\nManage Talk Assignments

Notice the use of \n? That is what splits the two text string components up. Thus, in the final application:

Example

So you should be able to specify all of your text correctly in the IDE editor.

0
votes

I solved the problem. I found that the "random strings" where the second part (after \n) of strings stored in the resources of a DLL which my program use. While the dll dialogs have IDs in range [2000, 2500], the 3 strings have id: 1, 2, 3.

I don't remember where I read that such low ids might be dangerous so I changed it manually to 3000, 3001 and 3002 and this fixed the problem.

Even if this worked, I would like to know why, so feel free to edit the answer and add the complete solution.