Hello,

I am a novice user of VC ++ and I have built an interface using MFC. I have created a form and now I have to link the form components (buttons, etc..) to my source code.

For example, I need to know what to do so that when i click on Button "Encrypt", it triggers the Encrypt function in my code.

I have attached my interface codes along with the source codes, if that can help.

I'd be grateful for any kind of help.

Add the encrypt *.cpp file to your MFC project then compile and link just as you have the rest of the program. In the OnClick() event handler for the button just call your emcrypt function as you would any other function.

Not able to unzip the attachment with WinZip.

that is exactly what i've tried to do.
My code is found in the AES class. The rest are MFC classes generated by the MFC Wizard.
When I tried to compile, i get the following errors:

FrmText.obj : error LNK2001: unresolved external symbol "protected: void __thiscall FrmText::OnBtnEncrypt(void)" (?OnBtnEncrypt@FrmText@@IAEXXZ)
FrmText.obj : error LNK2001: unresolved external symbol "protected: void __thiscall FrmText::OnChangeTextbox1(void)" (?OnChangeTextbox1@FrmText@@IAEXXZ)
FrmText.obj : error LNK2001: unresolved external symbol "protected: void __thiscall FrmText::OnButton1(void)" (?OnButton1@FrmText@@IAEXXZ)
FrmText.obj : error LNK2001: unresolved external symbol "protected: void __thiscall FrmText::OnChangeEdit1(void)" (?OnChangeEdit1@FrmText@@IAEXXZ)

any idea what i should do?

what program did you use to zip up those files ?

first use winzip to unzip it.
You'll get a .rar file.
Then use winrar to unzip the interface codes.
Sorry for the trouble.. :s

I don't have winrar. Why don't you just zip up everything with winzip and forget the .rar stuff. Then repost the zip file.

Hi

I've been trying to upload it since yesterday but the .zip version always fails.
I've uploaded it onto my server. You can download it from http://www.edge-ltd.com/code/Interface3.zip

By the way, i was just wondering, is it possible to link up C++ codes to a VB or Java interface?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.