BEGIN_MSG_MAP_EX breaks Visual Studio 2005 intellisense? - c++

I have a C++ application using WTL/ATL BEGIN_MSG_MAP_EX macros for message handling. I use some macros from atlcrack.h.
When we upgraded the projects to Visual Studio 2005, intellisense acts crazy. I've tracked the behavior down to the BEGIN_MSG_MAP_EX macro not behaving correctly with intellisense. However, I can not find a way to continue using BEGIN_MSG_MAP_EX and Visual Studio 2005.
Do I have to rewrite all my old message handlers and stop using BEGIN_MSG_MAP_EX or is there another fix?

I've been using WTL for years and haven't come across this issue, but I also find the default Intellisense in VS2005/2008 next to useless - it stops working for no apparent reason. If you want Intellisense to work the way God intended, I recommend you try Visual Assist X (free 30 day trial) - it might make your problem disappear - got to be better than changing your code to work around IDE problems?
http://www.wholetomato.com/

Related

Can Intellisense in Visual Studio 2017 suggest C++ headers to include?

Coming from a primarily C# background, I used ReSharper for many years. Being able to place my cursor on an unresolved reference, hit Alt+Enter, and select an option to add the appropriate using statement was invaluable. Now, Visual Studio 2017 has this capability natively! With this (and many other features added in VS2017) I got rid of ReSharper and am enjoying a very fast and responsive Visual Studio experience.
I've recently started doing some work in C++, and while I do get suggestions from Intellisense about fields and methods, when it comes to an unresolved reference it doesn't suggest any headers to #include.
My question is whether or not Visual Studio 2017 added the feature to suggest #include options for C++ or not? After scouring around, it seems Visual Assist X and ReSharper C++ have this feature, but I can find nothing detailing whether this feature is now available natively (and if it is, how do I enable it?) or whether it is still an extension exclusive.
It seems Intellisense does not, as of Visual Studio 2017, support suggesting headers to include for C++ types. As recommended by #Jack Zhai-MSFT, I have opened a user-voice issue for this request.

Visual Studio 2015 No C++ CLR Templates

I've been programming in android and have recently moved on to Visual C++ so I can make Computer Programs (Rather than apps), But when I create a C++/CLR emtpy Project in visual studio 2015, everything is fine at first but when I go to add a windows form, there are simply no templates, whatsoever. The 'installed' tab doesn't have ANYTHING under it, so thus I can't make a form to make my program. I have looked at other solutions but it seems, there is nothing for visual studio 2015, nothing else seems to work.
Any ideas would be greatly appreciated.
Thanks.
Setup Changes in Visual Studio 2015 Affecting C++ Developers - This ensures that non-C++ developers don’t have to pay the setup time and disk-space price for installing C++ bits that they don’t need. At the same time, C++ developers can still get the pieces they need.
source: entry about clr templates missing in Visual Studio 2015

Visual Studio 2012 / 2013 Syntax Highlighting errors

I have a problem with syntax highlighting in visual studio 2012 and 2013 preview with C++. I've had this problem since I installed both a few days ago (tried 2013 after I saw the problem in 2012).
As you can see from below, the colours are completely messed up in the text; some keywords such as int aren't properly highlighted, the grey return value is completely broken on various texts, the class colours have merged with various texts etc.
I've done the usual stuff found from google but had zero success, such as:
Reset intellisence from %appdata%
Reset user settings via command prompt or from Tools -> Import & Export settings
Turned off hardware acceleration in Visual Studio options.
This does not happen at all in Visual Studio 2010 fortunately, so I've kept that on my machine in the mean time. I did install 2012 and 2013 while 2010 was still present on my machine, but during install, i did not select the options to import 2010 settings, so "technically" they should have been clean IDE installs. The only other thing I've noticed is; when you start a project in 2012 or 2013, all the code highlighting is completely correct, but as soon as you change or add any text, everything messes up (like in the above image). So it does seem that Intellisense or whatever controls the highlighting only functions once on start up, and suddenly stops working for the duration of the program.
Delete this key
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors\Cache
and restart vs2013.
Found it in a discussion on codeplex. Although my problem was the lack of colors, you should try it
I can't offer a solution to this issue, but I can tell you that it's an issue that's plagued Microsoft Visual Studio 2012. In VS2010, the highlighting was fairly basic for C++, as you couldn't set the colouring on user types and loads of other things.
In VS2010, like you I had no problem with the syntax highlighting at all, but there was a lot less that you could actually highlight. Ever since they introduced this extra highlighting for C++ so you could colour a lot more items, it's been very buggy.
At the moment, I've got operators in all sorts of colours, matching brackets and braces in different colours and half-coloured qualifiers etc. I've just had to live with it... but if you're reading this MS, please... PLEASE... pretty please get it fixed.

Visual C++ 2010 native Intellisense settings

So, I started programming in C++ moving from Java, Eclipse IDE. I use VS 2010 proffessional, I have it for free from DreamSpark.
However, I am very unhappy with its Intellisense, beeing far far worse than Eclipse (its C++ version) has. But almost everywhere on the internet I read that VS has great, superior Intellisense for native C++. So I want to ask, is there any way, some settings to change to make VS intellisense behave simmiliar to Eclipse? Or is there any other functionality in VS intellisense that compensate that?
To be exact, Eclipse intellisense does much better job guessing what object I want to create, suggests includes, generate keywords, generate few common for cycles etc...
I would not even as this question, but I found somuch possitive feedback on native C++ VS 2010 intellisense, so I have feeling I am doing something wrong... Thanks.
If you are writing managed C++ (C++/CLI) there is a post explaining that intellisense is not currently implemented here
As for alternatives you may like visual assist X.
This question has also been answered before on Stackoverflow. Please see below for some alternative answers and suggestions:
No IntelliSense for C++/CLI in Visual Studio 2010?

C++ IntelliSense 'auto' feature? Where is it? How to get it 'on'?

I would like to enable the IntelliSense 'auto' feature (like the Visual Studio C# 2008 Express) but I am using Visual Studio C++ 2008 Express Edition and in the Tools > Options > Text Editor > C/C++ (there is no option 'IntelliSense' (like Visual C#). How do I get this feature enabled? I know I can get a shortcut in place (CTRL-space etc...)? But how do I get it automatically (the drop down menu)?
In C++, IntelliSense is turned on by default (and AFAIK there isn't even an official way to turn it off). However, when you're coming from C#, you might think it's turned off, because it's so much less powerful in C++. (The reason for this is that C++ is much, much harder to parse. You can find more information on the subject here and here.)
Visual Assist improves C++ considerably (although it might not be all that considerably when you're used to C#), but I don't think you can install plugins in the express edition.
This should be enabled by default. But sometimes for C++ projects it stops working.
Is there a .NCB file in your project folder? If so, close your solution, delete that file, and then re-open your solution and do a rebuild.
I use VC++ 2008 Express Edition as my primary environment. All I can say is that sometimes Intellisense works wonderfully, sometimes it doesn't work at all. The Intellisense parser seems to be slow as can be and stumbles over a lot of cases, especially when templates are involved. Sadly, I just don't think you can count on it being consistently available.
One thing that sometimes helps when intellisense doesn't do what it should, is to delete the .ncb file in the project folder in order to force VS to rebuild the internal database (close VS before deleting the file).