Windows messages from within (cygwin-created) DLL

stanley@advancel.com stanley@advancel.com
Thu Sep 30 20:48:00 GMT 1999


Hello,
    i am running into a small problem of trying to do something
that I am not sure it possible.  I have created a DLL using Cygwin,
which gets loaded dynamically (LoadLibrary) by another application
(which was also compiled with cygwin).
The DLL is supposed to create a window and handle certain operations
on it.  Looking through some books, it seems that all Windows
messages will go through application's message loop, and not DLL's
message loop.  There is also a mention of using application's hInstance
to create a window from within DLL.
    So, i guess i have 2 questions:

- how do i extract main program's hInstance from within DLL.
- how do i make my DLL handle the messages to the window (this is
the only window that gets created, so DLL can handle all messages).

  any help in resolving/working around this problem would be appreciated

-- stanley

p.s.  i only have access to the DLL code, not the application that loads
it.


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list