473,721 Members | 2,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C++ managed class issue

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::Compone ntModel;
using namespace System::Compone ntModel::Design ;

namespace VXP_Editors
ref class VXP_ColumnEdito r : public
System::Compone ntModel::Design ::CollectionEdi tor
VXP_ColumnEdito r(void);

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

#include "VXP_ColumnEdit or.h"

namespace VXP_Editors
#pragma region VXP_ColumnEdito r

VXP_ColumnEdito r::VXP_ColumnEd itor(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: 'CollectionEdit or' : is
not a member of 'System::Compon entModel::Desig n'
l:\editors\VXP_ ColumnEditor.h( 13) : error C2504: 'CollectionEdit or' :
base class undefined

how is it possible ?
in my project property options, i add the references to the right
SystemDesign.dl l
thx for help.


Nov 4 '06 #1
0 975

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Drew | last post by:
I have recently converted all of my native C++ dll's to be compiled with the /CLR switch. After doing this, I notcied a very strange and frustrating issue. One of my managed dll's calls another using a COM smartptr (MSXML2::IXMLDOMDocumentPtr to be exact). When calling my function in another managed DLL, my app starts throwing exceptions. If I step into my function, before getting into my function, I see a call to AddRef() and later a...
by: Paul Kenny | last post by:
Hi, I am trying to expose the functionality of an unmanaged C++ class to the other languages available in the .NET Framework. I have decided to do this by wrapping the unmanaged C++ class in a managed one. I have taken a look at following sample code on how to do this. http://longhorn.msdn.microsoft.com/lhsdk/ndp/vcmg_appendixs amplecode.aspx
by: E.T. Grey | last post by:
Hi, I have a C++ DLL that I want to use from a C# project. I am actually usng a lot of advanced C++ features like templates, partial/specialized templates, functors and callbacks. I am also using STL containers like std::string, std::vector and std::map quite extensively in my C++ DLL API. However, I can simplify the API so as to make it easier to use from C#. Below, is a very simple "proof of concept" C++ DLL. I would be extremely...
by: zhphust | last post by:
I want to convert a object of a managed class to a unmanaged structure that has the same member with that managed class. Can anybody tell me how i can do it? Thanks in advance. -- zhphust ------------------------------------------------------------------------
by: William F. Kinsley | last post by:
I am thinking of porting an existing MFC application to MC++ and I have created a simple MFC application to test the environment. My sample MFC application is compilied with the /clr switch. I added a basic WinForm class(via the wizard). In my MFC WinApp class I have a menu message handler to display the standard About Dialog. In the message handler I create, show and close the window. Everything appears to be working fine until I close...
by: Adam | last post by:
I can't seem to find one spot on the net that specifies exactly what I need to do. Situation: Native dll needs to hold a static reference to a managed class in .net 2.0 (whidbey) which needs to hold a static reference to managed classes. 1. In 2003 I needed special initialization because of the loader lock issue. In 2005 it seems I dont need this, however I am calling into a managed dll from a native dll, and I read somewhere there can...
by: Adam | last post by:
I have a managed cpp wrapper. Im using this in a native dll as a static variable. I need to free this library when the dll is done being used. The perfect place to do this is DllMain for DLL_PROCESS_DETACH, but I can't do this when touching managed code, even if its just calling "delete someObject;". Any recommendations on how to free this object (it needs to be freed when the dll is being unloaded from its caller). Since the CRT is...
by: Dave | last post by:
I've seen at least one article on this: How to access classes, etc. managed-to-unmanaged. I can't find it. Any tricks or pointers? I guess the class name won't get munged but I'm not clear about necessary class declarations.
by: Koliber (js) | last post by:
sorry for my not perfect english i am really f&*ckin angry in this common pattern about dispose: ////////////////////////////////////////////////////////// Public class MyClass:IDisposable
by: Andy | last post by:
Hi all, sorry for the cross group spam but my question does really fall into both groups. Here's my issue. I have a Visual C++, CLR Class Library with a public class and a public method in a solution. Also in the solution is a c# console app. I have referenced the c++ project from the c# project and can instanciate the vc++ class, however I cannot see my vc++ method from my c# project. As I understood it, as this was all managed code,...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.