?
Solved

!Help needed!

Posted on 2003-03-01
10
Medium Priority
?
225 Views
Last Modified: 2013-11-20
Hi all,

I downloaded a source code which contains both .h and .cpp files. In order to use this code I have to create a new class inside classwizard and then assign the variable type to the new class.

This is what I did:
-I added .h and .cpp to my project folder.
-Went to ClassWizard, and tired to assign my static text to the variable type of the new class, but I didn't find the new class name in the drop down menu.

How do I add the new class to my classWizard.
Please explain step by step....thanks
0
Comment
Question by:BerMuDa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 8050834
1) Using Class Wizard create variable of type CStatic

2) Include downloaded .h file to your dialog .h file

3) Manually replace class member type from CStatic to new class.
0
 
LVL 1

Expert Comment

by:vadik
ID: 8052595
ClassWizard stores the information about your project's classes in a file with the file extension .clw. To accommodate source files that have changed, ClassWizard displays the Repair Class Information dialog box whenever it finds that the information in the .clw file is out of date.

The Repair Class Information dialog box has two main functions:

1) Deleting obsolete classes from the ClassWizard file


2) Updating the ClassWizard file with the new name or location of classes that you have changed or moved

You need to delete this (*.clw) file from yours project's directory.
0
 

Author Comment

by:BerMuDa
ID: 8052667
I followed what you said, everything went fine excpet for the follwoing errors:
The source file I downloaded makes me able to create a hyperlink.
http://codeguru.earthweb.com/controls/hyperlink.shtml

Project.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CHyperLink::~CHyperLink(void)" (??1CHyperLink@@UAE@XZ)
ProjectDlg.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CHyperLink::~CHyperLink(void)" (??1CHyperLink@@UAE@XZ)
ProjectDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CHyperLink::CHyperLink(void)" (??0CHyperLink@@QAE@XZ)
Debug/Project.exe : fatal error LNK1120: 2 unresolved externals
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Expert Comment

by:vadik
ID: 8052777
Do you see the information about the CHyperLink class in your the ClassView Tree? Sorry for my English...
0
 

Author Comment

by:BerMuDa
ID: 8053291
No I can't see it
0
 
LVL 1

Expert Comment

by:vadik
ID: 8053576
I think that you didn't added the HyperLink.cpp file into the project.
0
 
LVL 1

Expert Comment

by:vadik
ID: 8053579
I think that you didn't add the HyperLink.cpp file into the project.
0
 

Author Comment

by:BerMuDa
ID: 8053653
I added HyperLink.cpp to the folder of my project.'
I added #include "HyperLink.h" to my Projectdlg.h file.
0
 
LVL 1

Accepted Solution

by:
vadik earned 600 total points
ID: 8053690
Do you see HyperLink.cpp in the FileView tree? You can get this error "error LNK2001: unresolved external symbol " by some reasons:

1) You have a *.h file but you haven't *.cpp and haven't *.lib for static linking.

2) If you have a *.cpp file this doesn't matter where is his location. You need to add this file into project (not folder) direct.
0
 

Author Comment

by:BerMuDa
ID: 8059557
Thanks

I was missing *.lib for static linking.
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question