How to suppress an icon on a tabbed document - mfc

I have a tabbed document that is an extension class of the CMultiDocTemplate class. When displayed, an icon appears next to the text on the tab itself.
I have found the actual icon that is displayed, and when I comment out the line that references it, a default icon is displayed instead.
How can I suppress the display of this icon?

I have a tabbed document that is an extension class of the CMultiDocTemplate class
What is "an extension class of the CMultiDocTemplate"? Is it class derived from CMultiDocTemplate?
If you are using custom code, to control something how anybody can answer question about it without knowing a code.
Could you please give more detailed information, possibly code snippets and most desireable, a sample app that demonstrate you problem .

Related

C++ class diagram Visual Studio 2022. I can't add a class to the mapping

Once again, the God-fearing and beloved (no) program Vusial Studio is forcing me to ask for help! I have a problem with the class diagram in C++. I want to add a class to the display and....error
"One or more of the selected elements cannot be added to the class diagram. This may be due to several limitations of the tool. Call for help for more information."
(by dragging and dropping from the Solution Explorer to the diagram)
I have no idea how to deal with it. Maybe it has something to do with adding the project to the version control system.
This is what the project schema looks like:
Tried adding a class to the diagram and waiting for it to display
According to the document: Class Designer errors:
Class Designer does not track the location of your source files
To resolve the error, drag the modified or relocated source code to
the class diagram again to display it.
This problem also occurs in my new MFC app. I opened the class file to make some changes and save it. Then the class designer works fine.

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.

How to show "edit image" in Sitecore experience editor?

In sitecore "content editor" we can use the "image editor" by clicking "edit image" in the data section, but in the experience editor it is not visible.
is there a way to make available for editors to use the image editor? or this behavior is a sitecore standard?
thanks for help
Picture field
I've just written it up in a blog post.
First you'll need to add a new button under
/sitecore/system/Field types/Simple Types/Image/WebEdit Buttons
You can duplicate one of the existing ones and change the icon and text yourself. Make the contents of the Click field:
chrome:field:editcontrol({command:"webedit:changeimage"})
(there's already a webedit:editimage so we can't name it that).
Open App_Config\Include\Sitecore.ExperienceEditor.config and duplicate the entry for webedit:chooseimage. Change the command name to webedit:changeimage as per above. Then change the type to the class you will create below.
If you have access to a decompiler, take a look at the existing command Sitecore.Shell.Framework.Commands.Shell.EditImage as well as the existing command
for selecting an image in Experience Editor Sitecore.Shell.Applications.WebEdit.Commands.ChooseImage. You'll see that they're similar, but unfortunately they use two different
methods of opening a dialog (Windows.RunApplication and SheerResponse.ShowModalDialog) so we can't reuse the existing class as-is. I have created a class that uses a bit of both (link below).
Create your class (eg. EditImage.cs), make it serializable and inherit from WebEditImageCommand like the other EE buttons. I have posted the full class as a gist for you.
When you select an image in the Experience Editor, you should now have an extra button in the list which opens the image editor in a modal window when clicked.
You need to do next steps, is not the most elegant way but you can do it:
In the Experience Editor, click the image that you want to edit, and in the floating toolbar that appears, click More and then Edit the related item. This opens the item in the Content Editor, from where you can scroll to the field that contains the image and click Edit image.

Is there a way to add my own button inside the edit common control?

Say, if I have a default EDIT common control in my MFC-based dialog window:
I'm looking for a way to add a small "X" (or delete) button inside of it (here's my Photoshop rendering of what I need):
Is there a way to do it by modifying the default edit control?
Please consider using new class CMFCEditBrowseCtrl. It does have method CMFCEditBrowseCtrl::EnableBrowseButton() to do exactly what you need.
If I wanted more than one button, I would investigate alternatives:
See the CMFCEditBrowseCtrl class' code. Then decide if derive a class from it and extend; or else derive from CEdit, copy CMFCEditBrowseCtrl code and extend.
Case the edit is multi-line, I would investigate the methods CEdit::SetRect and CEdit::SetRectNP. Case it is single-line I would look to CEdit::SetMargins. Then implement normal buttons over the text area of the edit.
Please refer this article for CMFCEditBrowseCtrl class..
https://www.codeproject.com/Articles/35722/MFC-Feature-Pack-CMFCEditBrowseCtrl

Binding a static text box to a checkbox

I need some help in MFC. The following is my problem:
I have two controls a static text and a checkbox
When using MFC Wizard, i place a '&' in front of one of the letters in the static text, while executing if i press Alt+, the checkbox either gets enabled or disabled.
Now my problem is i am adding these controls programaticaly, and even though i have the '&' placed in the static text, if i press the Alt+, it doesn't change the state of the checkbox control.
My queries are:
Can anyone kindly let me know if there is some binding which has to be done in case we are adding the controls programatically.
If someone can briefly explain how the binding is taken care by MFC it will be gr8 help
edit:
One more thing the checkbox won't have any text associated with it.
Since the static text is not associated with the checkbox control, how can the system know which checkbox it should link? I bet if you look at the TAB ordering and the group settings of the controls, you will arrive at your solution.