Hide a C++ Code Block from Intellisense

Hide a C++ code block from Intellisense

The proper macro for VC++ 2010 is __INTELLISENSE__, as described in this blog article: Troubleshooting Tips for IntelliSense Slowness

How do I turn off auto-complete for Code::Blocks

"Settings -> Editor... -> General settings -> Indent options -> Brace completion"

Prevent textbox autofill with previously entered values

For firefox

Either:

<asp:TextBox id="Textbox1" runat="server" autocomplete="off"></asp:TextBox>

Or from the CodeBehind:

Textbox1.Attributes.Add("autocomplete", "off");

Visual Studio displaying errors even if projects build

If you have ReSharper, try emptying the ReSharper cache:

In menu, ReSharper > Options > Environment > General > Clear Caches

and disabling and re-enabling ReSharper:

In menu, Tools > Options > ReSharper > General > Suspend / Restore

Greyed out code in VS Code C/C++ Extension

As I mentioned in the updated question, the problem isn't realted to the C/C++ Extension. It is acutally the TypeLens extension that causes problems here.

The best solution I have found is to configure TypeLens to not grey out unreferenced code. This way I can keep the reference counter and the code completion feature from the C/C++ extension but prevent the source code from being greyed out by TypeLens.

To achieve this, you have to set the Typelens:Unusedcolor value from #999 to nothing (just delete the value).

How to mark a method as obsolete or deprecated?

The shortest way is by adding the ObsoleteAttribute as an attribute to the method. Make sure to include an appropriate explanation:

[Obsolete("Method1 is deprecated, please use Method2 instead.")]
public void Method1()
{ … }

You can also cause the compilation to fail, treating the usage of the method as an error instead of warning, if the method is called from somewhere in code like this:

[Obsolete("Method1 is deprecated, please use Method2 instead.", true)]

Stop LastPass filling out a form

Adding

data-lpignore="true"

to an input field disabled the grey LastPass [...] box for me.

Sourced from LastPass.com

There are too many errors for the IntelliSense engine to function correctly

UPDATE: Others have asked about the same error message for other include files (not MSI related). I guess this is a generic problem that strikes every now and then - probably with classes that are in little use (or include Windows.h - perhaps)?

As a general suggestion this might be a hidden dependency problem (an include that is missing), or an incorrect order of the include files (you need to change the order of your includes for some technical reason that is not immediately obvious) or a incorrect or missing define (like seen in the answer below the line underneath). My take on it: get on github.com and search for similar sample code.

These issues can be quite clunky to work out for those of us who need C++ occasionally, and otherwise be "well known" for the C++ pros (who fix it in seconds as second nature). C++ pros: please keep in mind that issues such as these can kill a whole day's worth of productivity for those of us forced to clunk around with C++ when we need to - and have no C++ pros around to ask - terrible situation that! :-) - I hereby declare a "be nice to your C++ guru - if you got them - day!").


In stdafx.h, try adding this after #pragma once and before other includes:

#define WIN32_LEAN_AND_MEAN
// Windows Header Files:
#include <windows.h>

Now try to rebuild your solution and see if the problem has disappeared.

Though simple, the strangeness of the error message (seen in the question above) can throw people off course trying to figure out what is wrong. Also, this behavior seems new in VS2017 - template change.

It looks like including <atlstr.h> will also work, so that probably makes my problem more obscure. Could have sworn I tried this though - maybe after I made project settings changes that made it fail still (exactly what I hope to help others avoid).

If only these basic includes could be present in the file but commented out so they could be enabled quickly in sequence for testing - without any fuss.



Related Topics



Leave a reply



Submit