473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 WindowControlLibrary 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.resX.

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.resX 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(TestControl.cpp, TestControl.h
and TestControl.resX) 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 1533
> 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 WindowControlLibrary 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.resX.

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.resX 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(TestControl.cpp,
TestControl.h
and TestControl.resX) 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**********************@hotmail.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
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...
1
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....
2
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
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...
1
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...
1
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...
3
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...
2
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
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,...
0
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...
0
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...
0
agi2029
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,...

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.