Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2006

Tip: Looking for answers? Try searching our database.

How do I add existing visual Item to a project

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tony - 21 Mar 2006 14:26 GMT
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
Bruno van Dooren - 21 Mar 2006 22:16 GMT
> 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
[quoted text clipped - 32 lines]
> 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.

Signature

Kind regards,
   Bruno van Dooren
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.