when we have resources in our project, Visual Studio creates two files: "resources.rc" and "resources.h". Now, every change in rc file (in visual editor), changes header file also.
Sometimes I need to add something manually to resource.h, but after any change in visual editor, my header changes may be even deleted.
I've noticed that VS uses some kind of comments that steers its behaviour. So maybe there is a way to say to VS: "Hey, don't touch this part of file" ?
Related
I am working on a C++ project on Visual Studio which relies on UserInterface.fl file for its GUI. Intuitively I would understand that changing the UserInterface.fl file with FLTK would allow me to see those changes on actual GUI when built and run with Visual Studio, however that doesn't happen.
I have already tried restarting Visual Studio and rescanning and rebuilding the project but it hasn't helped.
The .fl contains the following lines of code to which I have tried to make changes as well to see results, but without success.
header_name {UserInterface.h}
code_name {UserInterface.cpp}
I would expect the changes to be visible on the GUI as soon as I change the UserInterface.fl file using FLTK without even having to alter the UserInterface.cpp or UserInterface.h files.
Thanks for any help in advance.
FLTK's fluid environment is completely different from your Visual Studio .sln solution. Thus your files would not automatically update to show the changes made through Fluid. However, you should be able to find the option of "Write Code" under the "File" menu in fluid. The shortcut is "Ctrl+Shift+c". This writes your code to the corresponding .h and .cpp file.
Apologies if this is a dup, had a look but couldn't find anything surprisingly. I just wondered when creating a a new class in visual studio (2013 or 15 or whatever really) that it creates a horizontal tab group with the header file on the top and implementation file below. I know it creates both files and opens them and opens them. After this I can do it manually but just wanted to save myself a couple of clicks really. If it's not in VS options is there a macro out there or something?
Thanks in advance
EDIT: I don't currently think this is possible but have put a feature request in for 2015
When generating a new C++ project - specifically, I create a new "Empty Project", the directory the file is stored in seems to contain an .sdf file. This seems to be generated whenever I open the project in Visual Studio 2013, even after I delete it. I also seem unable to open it, though I sincerely doubt it could contain anything.
This project does use SFML 2.3, but won't be using databases in any real capacity, so I had not specified in any options that something like this should be done. I'm not quite sure as to why the system is doing this, then.
Basically, I just want to stop VS from making this file upon opening the project. I'm not sure if uninstalling SQL Server will do anything to solve this, or if there is something else I need to consider.
The sdf file is created and owned by Visual Studio, not your program. When you open a solution Visual Studio will check to see if this file exists. If it doesn't VS will create one and populate it with code browsing and other information about the projects it manages. If the file already exists VS will open it and update the database with any code changes that happened outside of VS.
Although this file is not required for Visual Studio to load a solution or project it is required for some very useful functionality to work correctly. There's no real benefit in preventing VS from creating or accessing this file and I recommend you abandon the idea of preventing VS from creating it.
Does Visual Studio have a source code indexing feature for C++? That is, it statically parses your project, storing symbols in an index, such that you can easily and quickly jump to a definition of a symbol or see uses of it (i.e. call hierarchy)?
From what I can tell, in Visual Studio 2010, it has "Go to Definition" and "View Call Hierarchy" functions (if you right-click a symbol), but it takes a long time (a minute on my project) to find the info and do the action. It seems to be doing a crude text search in some cases.
I'm used to using Eclipse, which has an indexer, so those actions are almost instantaneous (after the indexing has completed).
Yes, Visual Studio Intellisense does just this. If your "go to definition" is taking a long time, it indicates that the project is not set up properly inside Visual Studio. You should be able to hover the mouse over a symbol (function name, variable name, etc.) and Intellisense should pop up instantly.
One cause of slow or incorrect Intellisense is creating a new project from a folder structure. If you have a bunch of .cpp and .h files in a complicated folder hierarchy, sometimes the project does not get created in a way that Intellisense can easily do symbol indexing. Also, if your project uses a lot of third party libraries, you need to make sure the header files are included in your project or else Intellisense will not be able to do anything with those symbols.
I am refactoring a (rather long) C program using Visual Studio Professional 2008 (9.0.30729.4462 QFE). I use function picker drop-down in the navigation bar to jump between functions in the source quickly.
I added a function to the top of some source code and now the function picker drop-down in the navigation bar is just wrong. It sometimes jumps me to a different function, or inside another function.
I've tried cleaning, building, rebuilding the project, closing and reopening the project and even rebooting my computer, and nothing fixes this.
My supposition is that the IDE needs to rebuild its source code index, but I've been searching to no avail to location such a file much less how to force a rebuild.
Thanks!
Deleting the .ncb file and reopening the solution should fix the problem.
Visual studio parses your source code and stores the results inside the .ncb (Intellisense database). The file is used for auto-completion, class-view browser, etc... It usually rebuilds automatically, but sometimes it needs a manual clean.