Accessing xml to edit ribbon elements - c++

I am using BCGPro for ribbon control in my VS15, MFC project. The ribbon syntax is saved in a form of xml. I want to create a tool that would load that ribbon.xml as a CBCGPRibbonBar element.
The problem is that it needs a resourceId, which is defined in rc2 of the respective project in which the ribbon is implemented, and i am trying to access that xml from another external project.
Project_1 -> ribbon implemented
Project_2 -> tool, that needs to load ribbon xml of Project_1.
P.S. please take care that it is not native MFC ribbon, but a BCG control.
Please suggest if anyone got any clue to perform this stunt. Thanks in advance!

Related

How to implement a simple add-in for MS Excel on C++

I need a help for implementing add-in for Excel 2010 or higher on C++, the only functionality of this add-in is renaming of current Excel sheet.
The add-in should create new custom tab on the Ribbon with name: “Test Add-in”, this tab contains group with name “My Functionality”, this group contains large button with some picture with name “Rename Current Sheet”. After clicking on the button, I should show the following dialog:
User can enter new name, click ok and after this, the name of current sheet will be changed.
I understand that I need to use #import directive for getting references to Office API, use ATL to wrap COM objects, MFC or WTL to create dialog, but I I'm not opposed to using the mentioned methodologies.

Icons do not show up in Informatica Mapping Designer

I am new to Informatica and I am trying to learn it bit by bit.Currently I am able to enable the repository services but nothing works after I get connected. As in the transformation icons do not get highlighted when I open the mapping designer. Please find the attached screen-shot. Let me know if any questions. Thank you.
You opened the Mapping Designer and connected to a folder but there is no mapping loaded - create a new mapping or open an existing one and transformations toolbar will become active.
You should have required permission to create source, target, mappings, transformations etc. Icons will be enables only when you have sufficient permission.
Can think of two possibilities,
you have disabled the toolbar...try right clicking in the toolbar area, and switch it on...
you might not have "Opened" the folder. Clicking the plus sign around the folder is not the same as right click -> open for a folder. Unless you open the folder, the areas for source analyzer etc, dont really open up for you..

How do I embed my GUI in Windows explorer?

I want to add an option to explorer (in windows) like the 'preview pane' but only an 'edit pane'. The idea is that I have text files that I want to edit, but I dont want to open an application to edit the file. I want to just click over in the edit pane and make the edits. Any suggestions what API's I can use to extend explorer in this way? (More than just 'look at the shell api: I have and I dont know which will allow me to accomplish this).
You have to implement PropertyHandler.
See Windows SDK \Samples\winui\Shell\AppShellIntegration\PropertyHandlers.
Each property is described by property schema XML file. This property schema must be registered with PSRegisterPropertySchema(). Property handler implements IInitializeWithXXX, IPropertyStore and optionally IPropertyStoreCapabilities. You have to register CLSID of your implementation for each file extension you want to handle (.txt in your case).

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.

How could Qt apply style from an external Qt Stylesheet file?

I would like the users to be able to customize the default look of our applications by simply loading their OWN Qt Style-sheet files. How do we accomplish that? Can anybody give me a head start?
Say the user have its stylesheet named stylesheet.qss and is located in the application folder.
You could load the style sheet when starting the application, using the -stylesheet argument :
myapp->stylesheet = stylesheet.qss;
But this require your user to know how to start an application with arguments.
What you could also do is to add a settings dialog in your app, where the user can choose a stylesheet path.
You can then open this file, load the content, and set it to your application with QApplication::setStyleSheet() :
QFile file("stylesheet.qss");
file.open(QFile::ReadOnly);
QString styleSheet = QLatin1String(file.readAll());
qApp->setStyleSheet(styleSheet);
Qt is providing an example online which might be helpful.
You just set the style sheet for the entire application based on configuration provided by the customer.
http://doc.qt.io/qt-5/qapplication.html#styleSheet-prop
You could set/get this configuration from any number of places, a properties dialog in the application is probably the most natural approach.