Mike Greiner

Hello,

I am in the (hopefully) final stages of porting an eVC 3.0 MFC application over to Visual Studio 2005. The application is fairly complex but after about 20 hours of work I am now able to compile, link and deploy the application successfully.

My problem is now with resources -- they don't seem be loading properly. None of my dialogs will load (DoModal() always returns -1) and attempts to load from the string table fail -- a debug ASSERT is raised. Strangely enough, the main form appears to load fine.

I have spent considerable time searching for solutions to this, but most of the information on migrating resources deals with problems that occur before successful compilation. My resources compiled immediately -- I didn't change a thing in any of the resources files after the migration wizard ran.

So, was there something I should have done Can anyone suggest a solution or at least the next steps I should take to figure out what the problem is

Unfortunately I am not too familiar with the raw file formats of the resource files -- I have always used the designer in eVC to create and modify my resources.

Any help would be appreciated,

Mike



Re: Smart Devices Native C++ Development Migrating Resources from eVC 3.0

Gangadhar Heralgi - MSFT

 

I think there was a bug with VS 2005 MFC libraries, that caused DoModal not to work. We have fixed the problem with VS 2005 SP1. If you are not in moving to VS 2005 SP1, then as a workaround you can enable RTTI  ( which you can do by, Project-->Properties | Configuration properties / C/C++ / Langauge, Enable run time Type Info to yes ), note you have to do it two times, because of an IDE bug. Ensure that your compiler command line shows  "/GR" in its build log.

However note that once you move from VS 2005 to VS 2005 SP1, you will no more need RTTI enabled, and you have to revert back to "/GR-" (RTTI set to NO)

 Also for a complete reference to the problem, you can refer this thread

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=217031&SiteID=1

Thanks,

Gangadhar Heralgi





Re: Smart Devices Native C++ Development Migrating Resources from eVC 3.0

Mike Greiner

I eventually figured it out. All my dialogs had the DS_MODALFRAME style set -- which is no longer supported in MFC 8.0. Removing this style from each dialog in the rc file fixed the issue.

(Why wouldn't either the compiler or the migration wizard point this out -- especially given that it was a default style in eVC)





Re: Smart Devices Native C++ Development Migrating Resources from eVC 3.0

3Stones

Not just that. The current MFC is too buggy. I have ended to rewrite many applications in Win32 APIs. Not only I don't need to worry those stupid bugs anymore, but also my applications are much smaller.