Basic visual studio c++ 2015 help mfc classes? - c++

I'm trying to get started with visual c++ by looking at some open source code and following some tutorials. I'm looking at the code and trying to figure out where parts are that I could modify but it's all just a bunch of confusing mess to me at this point for some very large open source and tutorial programs I'm looking at. I can't find the code that contains information about a specific variable or input for instance that I would like to try to understand better.
One of the things you see in beginner tutorials is that you can bring up the resource visual part of the application. Most tutorials start with drawing out the gui interface. The thing that they do to bring them to the coding area is just double clicking on the element. When I do this with my example source files though it just brings up the MFC add Class wizard, it doesn't take me to the code? I've tried researching what that is and gotten nowhere. Can someone explain to me why it doesn't take me to the relevant code what the mfc class wizard is, and how to find the parts of code that spcifically having to do with the particular input box/slider/dropdown ect easily?
Thanks for any help!

Related

VSIX Project - Properties tool window extension

There might be something wrong with the way I search for things but here is my problem. I'm looking for a way to implement a custom editing tool within the properties tool window in the Visual Studio editor. I've been looking through several documentation references, and they all lead to the use of different assemblies, but I can't get anything to work the way that I want.
First of all, I tried using the UITypeEditor class, with the step-by-step tuto I found here : https://learn.microsoft.com/fr-fr/dotnet/api/system.drawing.design.uitypeeditor?view=net-5.0
The problem I faced was that it only seemed to be working with Winforms projects, and I'm trying to use this with a WPF project.
Afterwards, I tried following this tutorial, in order to create a project template : https://learn.microsoft.com/en-us/visualstudio/extensibility/creating-a-basic-project-system-part-1?view=vs-2019
This has led me to think that the methods used in the tutorial might have been either deprecated or improved with the used of AsyncPackages instead of ProjectPackages, and the appearance of the Microsoft.VisualStudio.Shell.Flavor assembly that seem to render useless the ProjectNode class (it doesn't even show up anymore, the method has been replaced with a void).
The last bit I tried exploring was the use of the ProjectSystem, as documented here : https://github.com/microsoft/VSProjectSystem
It was actually worse because I couldn't get it to work like I wanted, the project type I was creating could not register C# files and I wasn't able to add new classes (I might need to dig a bit deeper here but I don't know where to look).
So basically, I'm looking for help to extend the properties tool window, through an editor within the window, or a modal window opened by clicking on an ellipsis button in the properties window.
Thank you for reading this, if you have any info, I'm very interested.
I've actually found a thread leading to what I was trying to do here. This tutorial leads to a way to implement a customized editor, either inline, extended or in another dialog window. This was the thing I needed, and with a few tweaks I managed doing what I wanted.

How do I access the code for a glade/gtk project I am working on

I am building a GUI for an encryption program my brother made. I want to learn more C++ so I am taking this opportunity to do so. I cant figure out how link my text editor Atom to the project. I can code the parts in C++ I just need help figuring out how exactly I attach the code I make to correspond with the GUI I have structured in Glade. Any resources would be very helpful.

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.

Debugger visualizer of GDI objects for unmanaged C++

Technically, is there a way to show images (bitmaps, icons, cursors) directly inside the watch window? As far as I know there is no way to do that via autoexp.dat. (If not, a tool window will also do.)
How can I transfer the image data from the debuggee to the debugger visualizer?
What other (see below) resources or sample code exists for the problem at hand?
Aside from the MSDN documentation and examples, I found this: http://www.idigitalhouse.com/Blog/?p=83 ... however, it "only" covers textual data. Virtually all other information was superficial (only covering "default" features of autoexp.dat) or for managed code.
Basically I am looking for this, but for unmanaged debuggees. The linked visualizer does not appear to work with unmanaged (C++) code, I tried that.
Is there any solution for native code at all?
I've eventually stumbled upon your question while googling. I had exactly the same question, only for OpenCV, not GDI images. I found there is no simple solution for this task. However, I've implemented one based on Visual Studio Debugging Expression Evaluator Add-In.
My implementation is available as a VSIX package named NativeViewer at SourceForge. If you need, you can adapt it to work with GDI images instead of OpenCV.
Have you seen my FeinViewer? I stopped supporting it for the lack of interest...
http://feinsoftware.com/FeinViewer.php
Aside from the visualizer by Mikhail, there is this one:
http://victorhurdugaci.com/projects/vsimagevisualizer/

C/C++ Code Examples with HTK (Hidden Markov Toolkit)

I am trying to get started with HTK, I grabbed a copy, compiled it, grabbed the book, and all went more or less fine, little troubles here and there but nothing serious.
Now after reading the book and googling quite a while, I do not see any documentation for the essential part for me: HTKLib. Everything is described into the smallest detail for all HTK tool programs (scriptable command line interface tools) but I cannot find a single example or tutorial how to actually call the lib.
Could anyone point me into a direction?
The source code for the respective tools is included, but it would be rather cumbersome to have to extract the information for a reputable library by reading the source code... I would have expected a little more documentation , but maybe I simply overlooked it?
Any help is deeply appreciated,
Tom
edit:
I was trying to use HTK for computer vision purposes, not for NLP, and for that I required that I could link against it, and call it from within my code. Thanks for your replies.
Maybe ATK is more suitable for you. Here is the explantation from the ATK site:
"ATK is an API designed to facilitate building experimental applications for HTK. It consists of a C++ layer sitting on top of the standard HTK libraries."
In addition Microsoft Research has another research tool here for training acoustic models. This includes a set visual project for HTKlib and a set of C++ HTK wrappers, but it may only include a subset of the HTK functionality and has licence restrictions.
I have not used it but use I the language modeling toolkit. I think the main intention is to use the command line tools provided. I imagine they are very flexible tools that will enable you to build and test models. Why do you want to use the code?
Also what are you trying to do?