> How do I incorporate a constructor resource such as an alert, into a
> shared library project, such that it doesn't require adding the alert
> in the "parent" application? I want code in the shared library to be
> able to call FrmAlert and have it work.

Call this a guess, since I've written Hacks but not shared libraries (but I
suspect they are similar in this context).  When your shared library code is
executing, the current top of the resource stack is the application's, not
the library's.  Which means that unless you explicitly open your library's
database, your library will never find it's own resources.

So you probably want something like this (although someone please correct me
if I'm out of my skull):

    dbRef = DmOpenDatabase(cardNo, dbID, dmModeReadOnly);
    if (dbRef) {
        buttonHit = FrmAlert(alertID);
        DmCloseDatabase(dbRef);
    }

where cardNo and dbID represent the database of your shared library.  Or use
DmOpenDatabaseByTypeCreator(...) if that's easier.

---- --- -- -
Matthew D Moss
[EMAIL PROTECTED]



Reply via email to