Click to See Complete Forum and Search --> : Can i call MFC Class from VB project?
cindyliao
June 29th, 2001, 03:16 AM
Can i call MFC Class from VB project?
Such as:
Dim a as CDialog
I know it's ok,but i don't know how
to config my VB enviroment.
Who can help me?
Thanks a lot.
Clearcode
June 29th, 2001, 03:22 AM
No, I'm afraid you can't.
MFC and VB were two different approaches to the same problem, vis. hiding the complexity of windows application development. The strategies they took are very different and I'm afraid you can't mix and match them.
HTH,
D.
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
cindyliao
June 29th, 2001, 03:33 AM
Then how can i use Dialogs in VB
just like in VC?
cksiow
June 29th, 2001, 04:09 AM
Dialogs in VC is almost same as Form in VB. if you set the borderstyle to fixed dialog, it looks almost the same as VC dialog.
.DoModal = .Show vbModal
.Create(xxxx = Load xxxx
.ShowWindow = .Show Modeless
HTH
cksiow
http://vblib.virtualave.net - share our codes
cksiow
June 29th, 2001, 04:11 AM
I know that VC can create MFC DLL, so if you wrap all function that you need in MFC DLL function, okay like this
WINAPI DisplayDialog
{
.....
..... //use some MFC to create dialog & display it
}
VB might be able to use it. I haven't tried it, so if you plan to try, let me know if it can be done.
HTH
cksiow
http://vblib.virtualave.net - share our codes
cindyliao
June 29th, 2001, 04:51 AM
Looks like a great idea!
If i have time, i'll try it.
If you have tried it, tell me the result.
Thx a lot.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.