Avatar of BerMuDa
BerMuDa
 asked on

!Help needed!

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
System Programming

Avatar of undefined
Last Comment
BerMuDa

8/22/2022 - Mon
AlexFM

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.
vadik

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.
BerMuDa

ASKER
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
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
vadik

Do you see the information about the CHyperLink class in your the ClassView Tree? Sorry for my English...
BerMuDa

ASKER
No I can't see it
vadik

I think that you didn't added the HyperLink.cpp file into the project.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
vadik

I think that you didn't add the HyperLink.cpp file into the project.
BerMuDa

ASKER
I added HyperLink.cpp to the folder of my project.'
I added #include "HyperLink.h" to my Projectdlg.h file.
ASKER CERTIFIED SOLUTION
vadik

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
BerMuDa

ASKER
Thanks

I was missing *.lib for static linking.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy