Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » error when deriving from CExtTabMdiWnd Collapse All
Subject Author Date
Jos Smit Aug 5, 2008 - 3:09 AM

When I just declare



class



COurTabMdiWnd : public CExtTabMdiWnd { /* empty class */ };

And I use that class in my mainframe, I get an error when Create() is called. The error says:


Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.


I must have done something wrong with my class declaration here. Tried adding DECLARE_DYNCREATE and stuff, but it makes no difference.


Does anyone know what I’m doing wrong?


Jos Smit Aug 6, 2008 - 12:47 AM

Some observations:



  • My project file is unchanged (I’m not the only one working on the project, but Source Safe says no relevant changes)

  • Didn’t touch Prof-UIS.h.

  • Didn’t override, CExtTabMdiWnd::CExttabCreate().

  • The constructor still seems to work fine.

  • When I start reusing the CExtTabMdiWnd again, it all works fine.


First I blamed the incremental linker, so I tried cleaning and rebuilding the whole solution, but this didn’t help either.


Actually I’m still blaming the linker or the compiler. In that case you can’t help me. I was just hoping you have seen this happen before.

Technical Support Aug 6, 2008 - 11:21 AM

We faced similar problems but only when compiling a project with Prof-UIS and MFC with some service pack for Visual C++ 6.0 and running with MFC DLL with some other service pack and only in a debug configuration. Could you try to re-produce the problem with some of our sample applications and try to re-produce it on some other computer? If it’s re-produced in your project only, we need a closer look at all the settings and source code.

Technical Support Aug 5, 2008 - 8:48 AM

Did you change the default calling convention and/or byte alignment options in the settings of your project? If yes, you should do the same changes in Prof-UIS and re-build it.