15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


\subsystem:windows,3.10 or ,3.51

Alexander Walsh -- sandy@andyne.com
Tuesday, October 29, 1996

Environment: VC 4.1, NT 3.51

Hey there!
We have an app developed under VC 4.1 (we still want Win32s). The
problem is that with the default linker option \subsystem:windows some
of our printer drivers will not keep the Portrait/Landscape settings
between successive calls to the Print Setup file option. So, we use the
\subsystem:windows:3.10 or \subsystem:windows:3.51 option and printing
options are fine. We do the same thing with another of our products and
it works fine. 

Now, all of our dialogs are completely junked. List controls don't do
what they should, dialogs fonts are different. All is not good.

I understand that this linker option loads different DLL's on startup,
or loads them with different parameters. Could someone please explain to
me what *exactly* happens with these extra options, what are valid
values and what the difference between 3.10 and 3.51 options are?!

I somehow suspect that our CWinApp::InitInstance() derivation is doing
something wonky with this new setting in the lines:
...
#ifdef _AFXDLL
Enable3dControls();             // Call this when using MFC in a shared
DLL
#else
Enable3dControlsStatic();       // Call this when linking to MFC
statically
#endif
...

Does this make any sense? BTW> we are dynamically linking,
multithreaded.

-- 
----
Alexander (Sandy) Walsh      | I hope I die peacefully in my sleep
Project Lead - GQL Reports   | like my Dad ... and not screaming
Andyne Computing Ltd         | hysterically like his passengers.



robmanderson@unn.unisys.com
Thursday, October 31, 1996

[Mini-digest: 2 responses]

Alexander
I think you'll find the problem might be related to being
multi-threaded and using the multithreaded libraries.  Recall that
win32s does NOT implement threads - the entry points are present but do
nothing.

Rob

To: smtp: mfc-l @ netcom.com@uns_domain
cc:  
From: smtp: sandy @ andyne.com @ uns_domain
Date: 29/10/96 08:44:04 GMT
Subject: \subsystem:windows,3.10 or ,3.51

Environment: VC 4.1, NT 3.51

Hey there!
We have an app developed under VC 4.1 (we still want Win32s). The
problem is that with the default linker option \subsystem:windows some
of our printer drivers will not keep the Portrait/Landscape settings
between successive calls to the Print Setup file option. So, we use the
\subsystem:windows:3.10 or \subsystem:windows:3.51 option and printing
options are fine. We do the same thing with another of our products and
it works fine. 

Now, all of our dialogs are completely junked. List controls don't do
what they should, dialogs fonts are different. All is not good.

I understand that this linker option loads different DLL's on startup,
or loads them with different parameters. Could someone please explain to
me what *exactly* happens with these extra options, what are valid
values and what the difference between 3.10 and 3.51 options are?!

I somehow suspect that our CWinApp::InitInstance() derivation is doing
something wonky with this new setting in the lines:
...
#ifdef _AFXDLL
Enable3dControls();             // Call this when using MFC in a shared
DLL
#else
Enable3dControlsStatic();       // Call this when linking to MFC
statically
#endif
...

Does this make any sense? BTW> we are dynamically linking,
multithreaded.

-- 
----
Alexander (Sandy) Walsh      | I hope I die peacefully in my sleep
Project Lead - GQL Reports   | like my Dad ... and not screaming
Andyne Computing Ltd         | hysterically like his passengers. 


-----From: Mario Contestabile

subsystem:xxx doesn't do skwat with DLLs. It just marks an executable
as compatible with a particular windows version.

In your case, using MSVC 4.1 to make an app which should run on Win32s,
you should use "subsystem:windows,4.0", which is the default since MSVC 2.1.
The app will gain benefits when run under Win95, as noted in PSS ID Number: 
Q125705.

Since you want your app to run on Win32s, the major thing you want to make 
_sure_
is that there are _NO_ dialogs with the DIALOGEX style. Just do a find for
"DIALOGEX" in "*.*". If there is such a dialog remove the "EX".

Calling Enable3dControls() does the following in the function:
 // 3d controls and dialogs are automatic on newer versions of Windows
 if (afxData.bWin4)  // which is true since you marked it  as 4.0
  return TRUE;
 // otherwise, attempt to load CTL3D32.DLL
...

So your app looks good, but not 3D on Win32s?!
If you check your Win32s test machine, you'll see that the Win32s installation
didn't put a CTL3D32.DLL in windows\system. And you can forget about
redistributing that DLL with your app, it *must* reside in \windows\system.
What I did was use MFC statically, and only call Enable3dControlsStatic()...

mcontest@universal.com





| Вернуться в корень Архива |