Article ID: 190968 - Last Review: March 5, 2002 - Revision: 1.0 BUG: IntelliSense Limitations with C++ ClassesThis article was previously published under Q190968 On This PageSYMPTOMS
This article discusses some of the limitations of IntelliSense when working
with classes. The following problems are addressed:
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this bug and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
MORE INFORMATION
The following is a code sample that illustrates the limitations described
in this article. This sample should be placed into a header file:
Class Constructors Do Not Activate Parameter InfoType the following line of code into the source file:Private Members Display in Members List Outside the Class DefinitionType the following lines of code into the source file:Although these functions and variables appear in the Members list, they will generate a compiler error C2248 if used. Private member variables and functions can not be used outside of the class in which they are defined. IntelliSense May Not Recognize Standard Win32 Data Types in Member Functions When Default Parameters Are UsedType the following lines of code into the source file: When an unknown data type is used in a member function parameter list, IntelliSense stops parsing the function at that point. At times, IntelliSense does not recognize Win32 data types as valid data types when used in member functions. This is related to the use of default parameters, and it causes Parameter Info and Type Info to generate a truncated list of function parameters. The only way to avoid this problem is to use the data type outside of a default parameter list before it is used in the member function. This has to occur in the same file that contains the class definition. The following is a workaround:
IntelliSense Does Not Recognize the Member Functions of a Few New MFC Classes, such as CIPAddressCtrl, CMonthCalCtrl, CRebar, and CRebarCtrlIn the CIntelliSense::MFCProblem function, enter a new line after the instantiation of the CMonthCalCtrl object. Insert the following code: REFERENCES
For additional information, please see the following article in the
Microsoft Knowledge Base:
153284
(http://support.microsoft.com/kb/153284/EN-US/
)
Limitations of IntelliSense in Visual C++ 6.0
"About Automatic Statement Completion;" Visual C++ Documentation, Using
Visual C++, Visual C++ Users Guide, Text Editor, Overview: Text Editor,
About Automatic Statement Completion.
"Automatically Completing Statements;" Visual C++ Documentation, Using Visual C++, Visual C++ Users Guide, Text Editor, How do I ... Topics: Text Editor, Automatically completing Statements.
| Article Translations
|
Back to the top
