using namespace issues

  • Thread starter --== Alain ==--
  • Start date
A

--== Alain ==--

Hi I've create a C++ managed Class as :

*.h file
--------
#pragma once

#include "afxcmn.h"
using namespace System::Design;
using namespace System::Drawing::Design;
using namespace System::ComponentModel;
using namespace System::ComponentModel::Design;

namespace VXP_Editors
{
ref class VXP_ColumnEditor : public
System::ComponentModel::Design::CollectionEditor
{
public:
VXP_ColumnEditor(void);
};
}

and *.cpp file
--------------
#include "stdafx.h"

#include "VXP_ColumnEditor.h"

namespace VXP_Editors
{
#pragma region VXP_ColumnEditor

VXP_ColumnEditor::VXP_ColumnEditor(void)
{
}
#pragma endregion
}


when i compile it, VC++.NET displays errors :

l:\editors\VXP_ColumnEditor.h(5) : error C2039: 'Design' : is not a
member of 'System'
l:\editors\VXP_ColumnEditor.h(5) : error C2871: 'Design' : a namespace
with this name does not exist
l:\editors\VXP_ColumnEditor.h(13) : error C2039: 'CollectionEditor' : is
not a member of 'System::ComponentModel::Design'
l:\editors\VXP_ColumnEditor.h(13) : error C2504: 'CollectionEditor' :
base class undefined

how is it possible ?
in my project property options, i add the references to the right
SystemDesign.dll


thx for help.

Al.
 
B

Bruno van Dooren [MVP VC++]

l:\editors\VXP_ColumnEditor.h(5) : error C2039: 'Design' : is not a member
of 'System'
l:\editors\VXP_ColumnEditor.h(5) : error C2871: 'Design' : a namespace
with this name does not exist

Open the object browser (view menu) and look at system.design.dll
You'll see that there is no System::Design namespace.

Probably a bug in intellisense because it is not supposed to present the
option IMO.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top