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

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


Visual C++ 1.52, CPropertySheet and Multiple Instance

Ho Thai -- hothai@callamer.com
Wednesday, January 24, 1996

Hi all,

I loose my multiple instance when having a CPropertySheet dialog in my =
application compiled under Visual C++ 1.52 compiler.  Anyone has any =
idea why and how to fix it?    I really appreciate your help.

Ho Thai



David W. Gillett -- DGILLETT@expertedge.com
Friday, January 26, 1996

> I loose my multiple instance when having a CPropertySheet dialog in
> my application compiled under Visual C++ 1.52 compiler. Anyone has
> any idea why and how to fix it?    I really appreciate your help. 

  The simplest way to make a 16-bit program one-instance-only is to 
have some static far data so that you have multiple data segments.  
This may be what's happening.

  If MFC required this, it couldn't be used in medium-model programs. 
I don't see anything in the relevant source that would have this 
effect.

  Besides declaring static data far, you can also get this effect if 
you've checked the "'extern' and uninitialized data far" option on 
the Memory Model page of the project options.  It's possible that some 
variable you've added as part of handling your CPropertySheet is 
meeting these criteria and forcing a second data segment to be 
created.  [You could figure out whether this is the case by examining 
the .MAP file from the linker.]

Dave





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