473,804 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I add existing visual Item to a project

Hello!!

Normally I use C# but we have a project that is creating a window control
library DLL that is done in C++.NET and that is here I have some problems
that I want to solve.

To be able to understand my question fully, I do the following.

1. Create a project that is a WindowControlLi brary called Test in C++.NET
in this project we have several files but the following are intresting for
me.
Under Source Files we have a file called TestControl.cpp
Under Header Files we have a file called TestControl.h and if you expand
this file you can see
TestControl.res X.

2.Open View Designer for TestControl.h and add for example a button.
3. Everything works as it should so far.
4. Now delete file TestControl.cpp and TestControl.h from the project Test.
When file TestControl.h was deleted, file TestControl.res X was also deleted
because it was connected to TestControl.h
5. The files still exist in folder Test but does not exist in project Test.
6 Now assume that you want to add these files(TestContr ol.cpp, TestControl.h
and TestControl.res X) back into project Test again.
7 I have tried different variation for Add Existing Item for my three files
to project Test but all my attempts failed in the way that I can never open
View Designor.
8 So how do I do if I want to add an existing visual control like the
TestControl.
9 It works perfectly to add new Item which I do in this way click on Source
File and select add New Item and choose for example User Control.

//Tony

Mar 21 '06 #1
1 1558
> Normally I use C# but we have a project that is creating a window control
library DLL that is done in C++.NET and that is here I have some problems
that I want to solve.

To be able to understand my question fully, I do the following.

1. Create a project that is a WindowControlLi brary called Test in C++.NET
in this project we have several files but the following are intresting for
me.
Under Source Files we have a file called TestControl.cpp
Under Header Files we have a file called TestControl.h and if you expand
this file you can see
TestControl.res X.

2.Open View Designer for TestControl.h and add for example a button.
3. Everything works as it should so far.
4. Now delete file TestControl.cpp and TestControl.h from the project
Test.
When file TestControl.h was deleted, file TestControl.res X was also
deleted
because it was connected to TestControl.h
5. The files still exist in folder Test but does not exist in project
Test.
6 Now assume that you want to add these files(TestContr ol.cpp,
TestControl.h
and TestControl.res X) back into project Test again.
7 I have tried different variation for Add Existing Item for my three
files
to project Test but all my attempts failed in the way that I can never
open
View Designor.
8 So how do I do if I want to add an existing visual control like the
TestControl.
9 It works perfectly to add new Item which I do in this way click on
Source
File and select add New Item and choose for example User Control.


Hi,

I could not find it either, but my curiosity got the best of me.
I found a first solution by hacking the vcproj file with notepad, but that
is not the best solution of course.

After some more fiddling I finally found the good way to do this:
1) add the files to your project again.
2) make the properties window visible (view ->other windows ->property
window)
3) select the header file
4) change the file type to C++ form

That changes it back to the state where you can edit it with the designer.

--

Kind regards,
Bruno van Dooren
br************* *********@hotma il.com
Remove only "_nos_pam"
Mar 21 '06 #2

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

Similar topics

0
1228
by: trevor | last post by:
When i load visual basic.net and select File - Add new item to an existing or a new project i receive the above error. I receive this with the windows form template and the data wizard template for example. Does anyone know why this problem occurs. I have only just purchased, registered and installed my copy of visual basic.net 2003 standard I have been able to find any reference about this and its a damn pain in the arse.
1
2611
by: Camel Software | last post by:
I've posted this in other places, but didn't get an answer. The project I'm working on is C#, so perhaps this is an okay place to post this. If there's a more appropriate newsgroup, I'm open to it. I've tried microsoft.public.dotnet.faqs and m.p.d.framework. ----- Hi, I have an issue with Visual Studio dotnet when using "Add Existing Item" to a web project. When I create a new project, that option works fine. When I
2
1227
by: Steve McLellan | last post by:
Hi, Can anyone tell me how I can add an existing (managed) form into a project, and have it appear like others (i.e. able to open in the designer)? Thanks! Steve
2
2478
by: ed d | last post by:
Hi, When I try to create a new web project, or "add existing project from web" or "open from source control" i'm prompted for a URL and type in a virtual directory. -- with "add project from web" i just get a file dialog box in "my documents" and browsing to the right project folder doesn't work.
1
1677
by: Robert Jones | last post by:
I have an asp.net web site that I want to develop further, but I don't have the Visual Studio project files for the site. I have all the source files for the site (aspx, cs etc) and the site itself is running quite happily on my development web server, however within Visual Studio the only way to add an existing file has two problems: 1. You can only add one file at a time 2. You don't appear to be able to navigate into subfolders...
1
5604
by: Christopher W. Douglas | last post by:
I am building a VB.NET application in Visual Studio.NET 2003. I have an existing project with code and forms I want to reuse in this project. If I am copying a module file, then Add Existing Item works fine. However, if I am copying a form, it pulls it in as a module file, not as a form. I have tried adding the .resx file first, adding the .vb and .resx file at the same time, or deleting the .resx file, nothing seems to work. I have a...
3
8633
by: garyusenet | last post by:
Dear Professionals, I have recently been using the wonderful krypton toolkit and am trying to use them in my small hobby application. I include this bit of info as an aside really because i'm sure my question can be extrapolated to the more general case, so here goes! I have a box standard windows forms project. (File, New Project, Windows Application, OK)
2
31024
by: Bruce | last post by:
I just copied the file folder containing an ASP.NET application from a backup on network share, to a new development workstation. But in the process, I've lost the .sln file. (BTW, I am accostomed moreso to .NET Windows Forms development, where the ..sln (and other metadata files) are all self-contained within the project file. In that case, I never have problems moving the project from one system or folder to another.) How do you...
0
9716
marktang
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...
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10354
jinu1996
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...
1
10359
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,...
0
10101
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6870
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();...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3837
muto222
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.