How can I add an accelerator key to an MFC checkbox in the designer? - mfc

Is there a way to add an accelerator button to an MFC checkbox in the designer, or does it have to be done in code? All of the examples I found on the web show how to do it in code. I tried adding an ampersand to the caption, but the expected underscore did not appear.

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.

MFC: How to create options dialog with listbox and multiple pages?

Developing using Visual Studio 2010 C++ and MFC. I want to create an options (preferences/settings) dialog box that can display several options. After considering many different options dialog box UIs I think I like the listbox-with-multiple-pages-style similar to visual studio's option dialog box (but I don't need the treeview, a list box is fine).
What's a good way to implement this? Do I use a CListBox and then handle the selection event to load up the individual pages? I'm new to MFC, what would the individual pages even be? Something like a panel? Ideally I would design them in the resource editor and then be able to load them up.
Take a look at http://www.codeproject.com/KB/dialog/embedded_dialog.aspx for one possible way of doing this.
The individual property pages can be designed as dialogs in the resource editor, and then the relevant page can be displayed in your main dialog depending on the selection in the list box, by handling the LVN_ITEMCHANGED message.
See CPropertySheet and CPropertyPage classes. This allows you to easily manage a properties window with several views.

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.

How do I add controls other than buttons/actions to toolbars in Qt, such as text boxes and combo boxes?

From the screenshot featured on this page http://www.kde.gr.jp/~ichi/qt/designer-manual-3.html it seems like this functionality was available in Qt3. Was it removed in Qt4?
I don't believe you can do so from within Designer. You can add other widgets programmatically using QToolBar::addWidget().

Adding drop down arrows to CMFCToolBar buttons

Can anyone explain how to add dropdown arrows to CMFCToolBar toolbar buttons - like for undo/redo buttons. We had this with CToolBar by using the TBSTYLE_EX_DRAWDDARROWS style and TBN_DROPDOWN notification. This doesn't seem to work with CMFCToolBar. These dropdown arrows i believe are added to the VisualStudioDemo MFC feature pack demo but i can not figure out how.
In the VisualStudioDemo sample, in CMainFrame::OnToolbarReset they replace the Undo button of the toolbar with a custom class called CUndoButton, like this:
m_wndToolBar.ReplaceButton(ID_EDIT_UNDO, CUndoButton(ID_EDIT_UNDO, _T("&Undo")));
CUndoButton is declared in file "UndoBar.h" of the sample project, so you can use it or change it however you like.