Help finding issue with tooltip on CMFCMenuBar - mfc

I have an MFC app using the new UI features released in the Feature Pack and I'm having trouble with tooltips on the menubar.
By default, I beleive tooltips are not enabled on menu items. Yet whenever I hover over the 2nd item in any of the menu lists I get a tooltip with "Untitled" in the popup. The only time this does not occur is when the second item is a seperator. This only occurs on the 2nd item, not on any other item in the list. What's also odd is that a tooltip popup appears when hovering over the "Edit" top level menu item.
So to illustrate, top level menu:
File Edit View Help (Hovering over "Edit" displays the tooltip)
To Illustrate the File menu
File
New
Open
Save
Save As
(Hovering over "Open" displays the tooltip)
Again the same behavior occurs for the second item on each of the menu sections. None of the other mennu items display tooltips.
Any help on how I might be able to pin down this probelm is much appreciated.

Found the problem. Without going into the back story, I had to merge resource ID's from another project into the Resource.h file in this project. IDR_MAINFRAME was set to a value of 2 from a very old project. MFC apparently does not like 2 for this resource ID. I change it to 128 which seems to be the default value used by the new app wizard. All is well now.

Related

Nested comboboxes in Qt

I'm looking for a way of nesting comboboxes in my GUI application (or to be more precise, I'm looking for a way to have an item displaying similar visual and functionnal properties as nested comboboxes).
Looking first at all the functions provided by the combobox class, it seems comboboxes nesting it's not supported by Qt.
I therefore thought that another solution would be to create a "menu" item outside the menu bar. If I understand correctly this phrase from the offical Qt documentation, it seems to be feasiable :
A menu widget can be either a pull-down menu in a menu bar or a standalone context menu
Not sure though was is meant by the "context" word.
However, there is no such (menu) widget in Qt designer and I haven't found any good examples about how to do it on the internet (and can't get a menu not associated with a menu bar to be displayed on the windows), explaining why I'm currently doubting whether it's feasible or not with a menu item.
I would greaty appreciate if you could provide some code sample along your response.
EDIT :
To clarify my first post, I'm trying to do something similar to this app :
It's the application that comes along the 3D connexion mouse whose usage is to parametrize each button.
As you can see, there are several sub-menu items. By clicking on the arrow next to a textbox, you open a sub-menu containing itself folders that contains themselves paramaters.

Sitecore 8, MVC, Experience Editor: How to make a rendering refresh after a Field Editor Button has been used

We have a rendering listing the selected items in a TreeSelect in the current item. In our case we call them "Tags" (1)
We have added a Field Editor Button to the component to let the editor change selected items. (2) (As described on for example Adding a custom component)
When an editor clicks (2) the editor window (3) it is opened in a dialog. The editor may select different items(called tags in our case) using the TreeSelect.
When the editor presses the ok-button (4) the values are set.
Now to the problem:
The values are actually set as they get stored when the editor presses the Save button but we want our list on the page (1) to immediately reflect the set items when the editor presses the ok-button (4), i.e. before having to actually save the whole item.
How do we achieve that?
(I am in contacts with Sitecore support but so far I have not gotten any answers...)
Update
After a lot of conversation with the support we still have no useful solution.
We tried turning it into a field renderer displaying the links.
What worked was:
The field do get updated when you have edited it in the popup field editor. (but...)
It looks good the first time when page is loaded.
You can make a WebEdit button with commands to edit the field and add it as Custom button to the field (register <command name="webedit:fieldeditor" type="Sitecore.Shell.Applications.WebEdit.Commands.FieldEditor, Sitecore.Client"/> and set Click on the button to webedit:fieldeditor(command={3473DDA1-2983-493C-AF7A-054C75AA7AD3},fields=NameOfField where the guid points to itelf and an "Icon" is set on it.)
What didn't work was:
The field get updated by the raw value, not what I want to display. Server code is involved, but not in the rendering of html-code.
When I want to edit the value in the field editor, the value sent to the field editor is not the raw value but what actually is displayed on the page. (I guess this can be solved somehow)
The issue to the support turned into a feature request to let the server be involved in rendering the field, not just sending a new value to the JavaScript updating it. The server does the first rendering so when it already is involved in updating, it should be allowed to do the rendering the following times too.
We have decided to not spend more time on this right now (we have other things to do too.) and have a bad editor experience as the field not get updated until the editor actually saves the item.
Still we have no suitable solution for this issue. If you want to keep working on it and want a reference to my issue it is 439059.
This may not be useful here. I've done this in normal sites, but not in Sitecore. But, here's one possibility....
This is a situation where you would pass a callback function to the child popup window. This callback will cause the caller / parent window to re-read/re-load the information that was just updated by the child.
Example:
User presses (2) to open Editor Window(3) (Editor window is opened and the Callback function is passed as a parameter)
User presses "OK" button (4). The "OK" button event handler updates the changes, then calls the Callback function which re-loads the now updated information, and closes the popup window.
Once the popup closes, the parent window now displays the information that the popup/editor just updated.
This takes some client side javascript (jquery) development but it is quite do-able normally.

the combobox dropdown list is so small that an updown arrows appear beside it

I have comboboxes that was built on the OWL I moved them to MFC and I faced alittle problem, the dropdown list of the combobox is so short that it shows only one item and you can navigate to the other items by using udown arrows like in the picture
the image on the left shows the short and incorrect one, the one on the right shows the release version that is working well.
what can cause this problem? and hoe to fix it. think it is style issue
Open dialog template in Resource Editor. Select combobox by mouse. Click on the "Down Arrow" element in the right part of the combobox (in your case it may be left part, according to localization). Then resize the combo to required height - in this state it resizes dropdown list. Build application and test dropdown list height at runtime - it should be OK.
http://msdn.microsoft.com/en-us/library/vstudio/4cta1x1t.aspx
See also: CB_SETMINVISIBLE message - allows to resize dropdown list size programmatically. I have never use it in my programs, though, so this is just a hint.

C++ MFC CComboBox is empty

i've a little comboBox, and i want to fill it with 6 entries... .
i wrote this code:
CComboBox* dropdownList = ((CComboBox*)GetDlgItem(IDC_PROGRAMDROPDOWN));
dropdownList->Clear();
dropdownList->AddString(L"test");
dropdownList->AddString(L"test2");
dropdownList->InsertString(2,L"test3");
dropdownList->InsertString(3,L"test4");
dropdownList->InsertString(4,L"test5");
As you can see I tried AddString(), and InsertString(). both with no effect. I also tried it just with AddString() which should be the correct way at initializing it.
But, my combobox is empty. I already debugged it, and this lines are hit but with no effect.
Do you have any idea?
In the dialog editor, make sure you resize the ComboBox item so that its height is big enough to contain all of the items when the ComboBox is expanded. By default, it'll only be the height of the "edit control" bit of the ComboBox, which limits the expanded height.
So, in the dialog editor, click on the dropdown button bit of the Combo Box and you should see the drag handles change a bit. Drag out the new size to account for all the items in the dropdown list.
thanks for all your answers. But it was an ugly Failure by my IDE -.-. I just recreated the UI-Element and it worked...
I recreated it with the same properties (Copy & Paste)

MFC Menu Drop Down (Screenshot included)

I'm having difficulties with an MFC application menu drop down. I want the drop down to display all items when it is clicked. Instead it displays arrows which the user must click in order to show the drop down items.
See the pic below. Any help would be appreciated. Thanks!
I believe this is a feature of the MFC feature pack where the menu will hide rarely used items. You should be able to disable this feature using the CMFCMenuBar::SetShowAllCommands method.