Visual Studio C++ multi form project - c++

This may be a very simple question but I cannot find the answer anywhere. I was given an existing Visual Studio C++ project. The project has multiple forms in it. The previous developer used all the default colors for the various forms and now my manager wants me to make it more specific to our company's colors.
Is there a way to change all the color scheme of all the forms. I was thinking of some sort of method to apply a theme across the board.

Related

Visual Studios 2015 C++ UML diagramm creating associations

I wrote an c++ application using Visual Studios 2015 for a class project in my school. Therefor, I have to submit an UML-Classdiagramm. I already heard of VS's ability of auto-generating UML diagramms from my written classes.
So I right-clicked on my solution explorer and generated this UML. I removed some unnecessary classes and already displayed some Members as association.
Now I want to associate some classes with each other because VS didn't do this for me. Those are one-to-many-associations like one bag associates with many items in it.
In code, I did this with a vector. but when I right-click the property and select "Show as Association" (or something similar :D) it keeps adding the vector-class instead of drawing my association to the class-type stored in this vector.
I also tried to add the associations manually but I can't because all the UML-classdiagramm-Items in my Toolbox are gray and not usable.
Any help is appreciated :)
I had the same problem. Visual Studio doesn't support this for C++. You have to create a new Diagram Project (not just adding it to your current project) and design your classes manually. The auto-generated class diagram works for C# (only?).

Flatten inherited members in Visual Studio's Watch window in C++?

This question is the same as this one, except that I'm debugging a C++ application. For the original question, a C# debugger has this functionality out-of-the-box now. Also, third-party tools for it exist.
Is there a way to achieve the same for C++? I'm currently using Visual Studio 2015.
EDIT 1
The classes in question are subject to change which limits use of Visual Studio's native Debugger Visualizers (natvis) feature. As far as I understand the custom visualizer will have to be modified every time the debugged class is changed, so that's not an option, regretfully.
Not find the third party tool or extension tool for VC++ directly in VS IDE, but I know that we could create custom view for VC++:
Reference:
https://msdn.microsoft.com/en-us/library/jj620914.aspx
It would be a workaround if you want to custom the debug watch view.
Update:
No other extension tool, but I help you submit a feature request to the product team here:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/18574198-flatten-inherited-members-in-visual-studio-s-watch
If possible, you could add your comment and vote it.

Debugging unmanaged C++ images in Visual Studio

I do write lots of image processing code with lots of different images involved on unmanaged C++ under Visual Studio 2010. I want to be able to watch them almost as easily, as a simple identifier while step-by-step debugging.
My current solution is to use some function which exports image in Matlab console. It is ok, but requires modification to source code, while I want to do it just while debugging. So the best option is just image popping up while hovering containing variable by mouse. But writing some command ExportToMatlab(image) in Command Window is enough. I don't know how to do even this, however.
There is the very similar question "Debugging image rendering in Visual C++, any helpful add-ins?", but it is too old and I found no acceptable answers in that discussion. Some tools are .NET-based (see image below), some requires additional code to be written (that's what I currently am using), and some projects are frozen or unfinished.
I can spend some time on implementing appropriate solution, so links to some good guides on how to customize debugger visualizer in VS are welcome too.
Update
I've created a Visual Studio extension based on Expression Evaluator Add-In. It is available to download from its SourceForge project page, called NativeViewer. Check for description on how to use it.
I can't actually believe that nobody suggested Image Watch yet. It's the most amazing add-in ever. It shows you a view with all your Mat variables (images (gray and color), matrices) while debugging, there's useful stuff like zooming or contrast-stretching and you can even apply more complex functions directly in the plugin in real-time. It makes debugging of any kind of image operations a breeze and it's immensely helpful if you do calculations and linear algebra stuff with your cv::Mat matrices.
Just for history: I've implemented my own solution based on Expression Evaluator Add-In. It doesn't fit well enough, but I was able to implement all what I needed.
Update
I've created a publicly available Visual Studio extension. It is available to download from its SourceForge project page, called NativeViewer. Check for description on how to use it.

How to auto-generate settings/options dialog box?

Using Visual Studio 2010 C++ with MFC. The number of configurable settings in my application is slowly creeping up. I managed to design a settings class where adding a single line will add a setting to the program and support reading/writing that setting to my ini file. However, I still need to go into my gui editor and edit the options dialog box, moving text boxes around, aligning labels etc. which is kind of a pain.
How would I autogenerate my options dialog box such that I could give it a data structure and it could generate the option interface for me? It's okay if it's something like a list box. I'm thinking something like the the Visual Studio properties dialog box which has the look of something that's programmatically generated:
I'm just trying to get a conceptual overview of what controls would be best and how to piece it together. Of course if there is a link to a web page discussing this that would be great.
You want the CMFCPropertyGridCtrl class. It was introduced in one of the MFC updates, but I'm not sure whether or not they come pre-installed with Visual Studio 2010; you may need to install something extra.

Creating a C++ Class Diagram

In Visual Studio .NET projects you can add a "Class Diagram" to the project which renders a visual representation of all namespaces, classes, methods, and properties. Is there any way to do this for Win32 (not .NET) C++ projects? Either through Visual Studio itself or with a 3rd party tool?
If you have a Visual Studio 2008 solution composed of multiple C++ projects, you can only generate one class diagram per project.
For example, if you have one application project linking to 10 library projects, you'll have to generate 11 separate class diagrams.
There are two ways to work around this, neither of which is pleasant:
Cram all the source into a single project.
Create a class diagram for one project (the application, perhaps) and then drag files from all the other projects into the class diagram.
A more thorough exploration of the capabilities of the Visual Studio class designer is given in Visual C++ Class Designer.
Given the poor support for C++ class diagrams in Visual Studio, you're probably better off going with a commercial tool if you want anything more than a simple list of what classes you have. WinTranslator from Excel Software might be worth looking at, and someone I work with uses Source Insight.
Most UML tools should be able to do that. I know that Sparx Systems Enterprise Architect does.
I've got VS2008 SP1 Professional and class diagrams are working fine for C++ WIN32 and Makefile projects.
If you're using Visual Studio, class diagrams for C++ were not correctly implemented until Visual Studio 2008.
Class designer is not meant for C++, even in VS 2008. You will be better off with some more specialized tool. It works for simple projects which don't heavily use templates. Also, get modeling power toys from codeplex.
Try doing partial specializations and watch how it crams everything into a single shape.
A cheap way would be to document your source with Doxygen and let this tool create the class diagrams for you.
If your project is a c++ based project then you have to drawn class diagram of c++ first,If your project contain 'n' number of sub-projects then you have to drawn 'n+1' number of class diagram.
Basically a class diagram contains
class variables.
class functions.
Relation between classes.
You should place all the properties which are required for a class inside a class diagram. It looks like a table (graphical structure) having 3 rows type box.
Row 1. class name(If it is an Object diagram it should and must under lined).
Row 2. Variable list(One variable in one line).
Row 3. Function list(One function in one line)
You have to make the Relation between one class to another class.