Customise Visual Studio 2017 toolbar - open a specific file - visual-studio-2017

Short of writing a VS add-in, is there a way to add a button to a VS toolbar which opens a specific xml file from a fixed location in a new editor window?

You can use my Favorite Documents extension to add a link to a file and then open it from the Favorites menu.

Related

Missing View Design in Visual C++ (Visual Studio 2017)

I can't open View Design in VS 2017, it's just missing.
It doesn't show any desinger in the open methods.
Neither in the other pop-up window..
If your project is MFC project, it has a '.rc' file. Double click this file will lead you to dialog or view designer. Other wise these is NO any view design. The second picture you mentioned can only navigate you to '.cpp' file of an '.h' file.

Please select a valid startup item

I have migrated from Visual Studio 2008 to VS 2017.
I am getting this error when I try to run project with the green play button:
Obviously I have to select a valid startup item, but there are two pieces of information I need to do that:
what are typical valid startup items that I can try to select?
How do I select them?
I am a long time developer, but I am new to visual studio so please give me instructions based on terminology I can see on the screen.
It might be the case that you have opened your project using
File->Open->Folder
Use the right method to open your project using
File->Open->Project/Solution
or
File->Open->Website
File > New > Project From existing code. Select type of project > Next. Enter project name > Finish.
I went to File > Open > project/Solution and found the ".sln" file. I clicked on it and then pressed open and it worked for me. Just spent ages trying to figure this out!
Regards,
Open Visual Studio ------------------
Click File
Click Open
Open as Web Sites
Another method
Click File
Click Open
Open as Project
I found this question after I did File → Open → Folder as well. However in my case it's not a website, all I have is a source file. I don't want to create a full solution.
Now that Visual Studio supports CMake (to some degree), easiest is to add a simple CMakeLists.txt file, like this:
project (theproject)
add_executable (thetarget source.cpp)
As soon as the folder contains this file, Set as Startup Item turns up as a menu item in the Solution Explorer!
The only solution is that or this error:
please select a valid startup file is that repair your visual studio
double click on visual studio installer and then click on the More then repair your visual studio

MFC Ribbon imports as XML instead of opening designer after saving

I made a resource file from scratch - I renamed an empty .txt file to .rc and then opened it in Visual Studio. Then I added a ribbon, a dialog, etc. to it. Then I saved and quit. When I reopened the file again, Visual Studio complained:
error RC2144 : PRIMARY LANGUAGE ID not a number
... which was fixed by adding #include <windows.h> in the resource.rc file.
But when I opened the file again, I got this:
MFC Ribbon Error RT_RIBBON_XML
Visual Studio seems to import the ribbon as an "RT_RIBBON_XML" type, not as a "Ribbon" like usual. As you can see, it says that there's an "external file" - and yes, the ribbon XML itself is in a seperate file in the same directory. But I can't open the ribbon in the designer anymore, it just shows the XML instead of the Ribbon designer. How can I tell Visual Studio that this XML is indeed a ribbon?
I have tried importing the ribbon via "Add resource > Import", but I can't import it as a "Ribbon" type, but Visual Studio says it's not allowed to open an external type as a built-in type.
I've tried making a new ribbon, then opening the data and copy-pasting from my old ribbon into the new ribbon. The ribbon gets saved correctly, but Visual Studio doesn't open the file anymore, meaning: When I open the file in a text editor, I can see all my attributes, but when opening it in the designer, it's simply an empty ribbon. How can I load my original ribbon?

where is the code generated by visual studio controls editor for visual c++?

When I make a dialog with visual c++ editor, I would see the code generated by my editor to make the window components..It's possible? When I double-click on a component, I see only the handler
The controls/components of a Dialog Box are described in a Resource Template, in a RC file. In the Solution Explorer, right click on the RC file in "Resource Files" and then choose "Open with..." and select "C++ Code Editor".
The link between the content of the RC file and the C++ code creating the Dialog Box at Run Time is done via the CreateDialog API, or one of his cousin, as CreateDialogParam.

Visual Studio 2010 resource tree doesn't open

I'm having a problem with visual studio 2010 in that I have a MFC project I've made which includes a dialog box. However when I go to the resource view, I can see the .rc file (I can't see the .rc2 file, which is listed in the solution explorer) but when I click on it, it doesn't open into the expected ICON, DIALOG, MENU etc.
The project runs and compiles fine, but I just don't get why I can't get to the dialog to edit it.
Thanks
James