TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: David Noon
from: Gerard Gerritsen
date: 1997-02-03 13:43:00
subject: Resources ?? Aargh

Hello David!

Thursday February 06 1997, David Noon writes to Gerard Gerritsen:

 GG>> I have got
 GG>> - one dll called 'B' with it's own resources linked into the dll
 GG>> - one program called 'A' also with it's own ( different ) resources.

 DN> You should not have a .RC file for each .c/.cpp file. Instead you should
 DN> have a single .RC file for the DLL "project" (or whatever your
 DN> compiler's IDE calls it).

They are seperate ( sbpm2.* and playpm2.* ) I have even added 2000 to the
constants ( id_resource 1 becomes id_resource 2001 of the dll. ( so there
would not be any form of interference )

To be more specific, SBPM/2 is a mixer program for soundblaster cards that
originated from PlayPM/2. One week ago I figured out it would be nice if I
could 'import' the functionality of SBPM/2 into PlayPM/2. So I rewrote
SBPM/2 to work as a dll ( took about 20 minutes ).

The problem is, that if I compile PlayPM/2 to include the code of SBPM/2 (
and it's resources ) everything works fine.

As soon as I recompile PlayPM/2 to import the functionality from a DLL,
OS/2 is only able to display it's main dialog ( -> it can read resources
from the dll )
but if I try to show a few minor dialog ( the settings dialog ) os/2 fails.

So I tried to split WinLoadDLg into DosGetResource and WinCreateDlg,

DosGetResource works fine but WinCreateDialog bombs out. A few days ago I
was tired of trying and put everything back to normal...


 DN> [You're now going to tell us that you used the same macro names for
 DN> different resources in the separate .RC files. Tut tut! You'll have to
 DN> fix that.]

I use Virtual Pascal and have to define my own constants since the
generated .h files are not compatible with Virtual Pascal...



==> Gerard/2   - member of team os/2 -  gerard{at}odie.et.fnt.hvu.nl

--- Fmail/2 1.02 Registered
* Origin: This can be quite frustrating... (2:283/203.18)
SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407
SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1
@PATH: 283/203 2 1 280/801 270/101 712/624 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.