Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling MFC from win32 program...Possible?

Status
Not open for further replies.

visitor1203

Technical User
Nov 15, 2001
1
NZ
Hi there,

I am wondering if there is a way of sucessfully calling an MFC based Dialog from inside a Win32 API program. I have been able to create the dialog (and it's MFC code) and include the code to open the Dialog on a button click event(using a .DoModal() call). This all compiles fine.

However when I run the program and click the button I get a debug assertion failure in afxwin1.inl at line 22.

If any one has tried this before I would be interested to know if what I am trying to do is possible, and how to get around the problem I am having. I am using Visual C++ 6.0 on Windows 98

Thanks for any help or opinions
 
Do you mean that you created a Win32 console program and are using MFC code in it?

If so, this is most likely a PROJECT SETTINGS problem - U need to make sure that the MFC.dll or lib is among the listed Libraries for your project I think - I'm not sure if that's it b/c wouldn't give you a linker error if it couldn't find it? Someone who knows more about this should say...

Anyways you can create a dummy MFCprogram project and look at the project settings to compare what's lacking in your project's settings that make MFC run.

Rocco is the BOY!!

SHUT YOUR LIPS...
ROCCOsm.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top