www.digitalmars.com         C & C++   DMDScript  

c++.mfc - Win95 MFC program on Win2000?

reply "Yochanan Spielberg" <yochanan bigfoot.com> writes:
                                                                bs"d
Hi,

I have a fairly large MFC program which runs great on Win95/98.  A customer
is trying to run it on Win2000 and reports that it doesn't run- that is to
say it doesn't even show the opening window.  How do I compile my program so
that it will run on Win2000?  Is there someway I can compile one version
that will work on all Windows platforms? Are there any DLL's I need to
include with the CD that aren't part of the basic MS operating system for
2000?

                      Yochanan Spielberg
May 30 2001
next sibling parent reply Jan Knepper <jan smartsoft.cc> writes:
Hi Yochanan!

Do you use MFC in a .DLL or in a static library?
If you use it in .DLL form you might want to theck the version of MFC you're
using and make sure you copy the SFC???.DLL files into the application
directory.

However. I use MFC quite a lot and *never* experienced any problems like you
describe. I used to test on NT, not 2000, and everything always worked on 95, 98
and ME as well. I however do NOT use MFC in a .DLL.

HTH
Jan



Yochanan Spielberg wrote:

                                                                 bs"d
 Hi,

 I have a fairly large MFC program which runs great on Win95/98.  A customer
 is trying to run it on Win2000 and reports that it doesn't run- that is to
 say it doesn't even show the opening window.  How do I compile my program so
 that it will run on Win2000?  Is there someway I can compile one version
 that will work on all Windows platforms? Are there any DLL's I need to
 include with the CD that aren't part of the basic MS operating system for
 2000?

                       Yochanan Spielberg

May 30 2001
parent reply "Yochanan Spielberg" <yochanan bigfoot.com> writes:
bs"d
Hi Jan,

I am using MFC in a static library, and compiling with the Project Settings
Target Platform set as Windows 95.  The program does make use of
COMDLG32.DLL and COMCTL32.DLL.  Do these ship as part of the basic Windows
2000 setup, or do I need to provide them to the end user?

"Jan Knepper" <jan smartsoft.cc> wrote in message
news:3B14D847.C14DF53E smartsoft.cc...
 Hi Yochanan!

 Do you use MFC in a .DLL or in a static library?
 If you use it in .DLL form you might want to theck the version of MFC

 using and make sure you copy the SFC???.DLL files into the application
 directory.

 However. I use MFC quite a lot and *never* experienced any problems like

 describe. I used to test on NT, not 2000, and everything always worked on

 and ME as well. I however do NOT use MFC in a .DLL.

 HTH
 Jan



 Yochanan Spielberg wrote:

                                                                 bs"d
 Hi,

 I have a fairly large MFC program which runs great on Win95/98.  A


 is trying to run it on Win2000 and reports that it doesn't run- that is


 say it doesn't even show the opening window.  How do I compile my


 that it will run on Win2000?  Is there someway I can compile one version
 that will work on all Windows platforms? Are there any DLL's I need to
 include with the CD that aren't part of the basic MS operating system


 2000?

                       Yochanan Spielberg


May 30 2001
parent Jan Knepper <jan smartsoft.cc> writes:
Yochanan Spielberg wrote:

 I am using MFC in a static library, and compiling with the Project Settings
 Target Platform set as Windows 95.

That's what you should do to get the latest Win32 features.
 The program does make use of COMDLG32.DLL and COMCTL32.DLL.  Do these ship as
 part of the basic Windows 2000 setup, or do I need to provide them to the end
 user?

No, they come with Windows 2000. No need to do anything. Is the program using any 3rd party DLL? Jan
May 30 2001
prev sibling parent reply Josh Soref <soref wam.umd.edu> writes:
Yochanan Spielberg wrote:
 I have a fairly large MFC program which runs great on Win95/98.  A customer
 is trying to run it on Win2000 and reports that it doesn't run- that is to
 say it doesn't even show the opening window.  How do I compile my program so
 that it will run on Win2000?  Is there someway I can compile one version
 that will work on all Windows platforms? Are there any DLL's I need to
 include with the CD that aren't part of the basic MS operating system for
 2000?

do you do any registry access that assumes full registry permissions? when I try to track down problems, I use regmon, filemon (sysinternals.com) and depends (dependencywalker.com). regmon and filemon can show things like access denied, and dependency walker can give system information as well as minimal crash information
Jun 03 2001
parent reply "Yochanan Spielberg" <yochanan bigfoot.com> writes:
                                               bs"d
Hi,

Thanks for your help.  I got my client to run the debug version of the
program on Win2000 using a program called DebugView so that he could save
the Error and Trace output to a file.  The output was:

[572] Ctxt01App constructor
[572] Ctxt01App::InitInstance
[572] CmainFrame::constructor
[572] Added doc templates- Creating an MDI frame window
[572] Warning: failed to load menu for CFrameWnd.
[572] CMainframe::destructor

from which I was able to pinpoint the error to this code from my Win main
App class InitInstance() function:

 TRACE("Added doc templates- Creating an MDI frame window\n");

 if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) {
  return FALSE;
     }

Something in the pMainFrame->LoadFrame command is not working on Win2000
that works ok on Win95.  Do you have any suggestions what might be causing
the problem?

Thanks.

              Yochanan Spielberg


"Josh Soref" <soref wam.umd.edu> wrote in message
news:3B1AD88F.FB8568F wam.umd.edu...
 Yochanan Spielberg wrote:
 I have a fairly large MFC program which runs great on Win95/98.  A


 is trying to run it on Win2000 and reports that it doesn't run- that is


 say it doesn't even show the opening window.  How do I compile my


 that it will run on Win2000?  Is there someway I can compile one version
 that will work on all Windows platforms? Are there any DLL's I need to
 include with the CD that aren't part of the basic MS operating system


 2000?

do you do any registry access that assumes full registry permissions? when

depends (dependencywalker.com).
 regmon and filemon can show things like access denied, and dependency

Jun 20 2001
parent Chris <chris widdows.demon.nl> writes:
On Wed, 20 Jun 2001 17:35:51 +0300, "Yochanan Spielberg"
<yochanan bigfoot.com> wrote:

                                               bs"d
Hi,

Thanks for your help.  I got my client to run the debug version of the
program on Win2000 using a program called DebugView so that he could save
the Error and Trace output to a file.  The output was:

[572] Ctxt01App constructor
[572] Ctxt01App::InitInstance
[572] CmainFrame::constructor
[572] Added doc templates- Creating an MDI frame window
[572] Warning: failed to load menu for CFrameWnd.
[572] CMainframe::destructor

from which I was able to pinpoint the error to this code from my Win main
App class InitInstance() function:

 TRACE("Added doc templates- Creating an MDI frame window\n");

 if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) {
  return FALSE;
     }

Something in the pMainFrame->LoadFrame command is not working on Win2000
that works ok on Win95.  Do you have any suggestions what might be causing
the problem?

I'd say your resources are marked W95, mark them NT4 and they should work on NT4, 2000, 95, 98, ME. Chris.
Thanks.

              Yochanan Spielberg


"Josh Soref" <soref wam.umd.edu> wrote in message
news:3B1AD88F.FB8568F wam.umd.edu...
 Yochanan Spielberg wrote:
 I have a fairly large MFC program which runs great on Win95/98.  A


 is trying to run it on Win2000 and reports that it doesn't run- that is


 say it doesn't even show the opening window.  How do I compile my


 that it will run on Win2000?  Is there someway I can compile one version
 that will work on all Windows platforms? Are there any DLL's I need to
 include with the CD that aren't part of the basic MS operating system


 2000?

do you do any registry access that assumes full registry permissions? when

depends (dependencywalker.com).
 regmon and filemon can show things like access denied, and dependency


Jul 29 2001