Re: MDI application embedded into DLL



OK,

The main application (MFC MDI) has a lot of components called by clicking in
the main toolbar. Each component is embedded into DLL written in Delphi
language and the main application uses functions exported in these DLL. But
one must be written in C++ (let's say "cour") and must have the same
functionality that a MDI MFC application such as open several documents,
work in these documents and save them. The component "cour" have also its
main toolbar containing functionality like open, save, print, print preview,
copy, paste, undo, etc. and I want that this component (cour) be embedded
into DLL and shared by another main application (not written in C++). So, I
want to build the component "cour" in the form of DLL with its own MFC
classes (view, document, mainframe, etc.) and export some functions to be
called by the two main applications.

In summary, I want to have a DLL component that has the same behavior that a
MDI application but I can't do it with the three forms of MFC DLL. In these
three forms, I haven't the view, document and mainframe classes and I don't
know how to start the MFC framework in these DLL to open document or to
create new document in a child frame.



Thanks for interesting

Aa

"Ajay Kalra" <ajaykalra@xxxxxxxxx> a écrit dans le message de
news:75983db2-0a4d-40fa-818d-d7d230ff8a0d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Its not clear what you are trying to do. Are you asking to execute
commands between two instances of an application? Why do you need to
use ShellExecute to execute commands?

---
Ajay


On Mar 5, 5:21 am, "AYARA Adel" <adel.ay...@xxxxxxxxxxx> wrote:
Hi,
Perhaps, I didn't explain very well what I want. In fact, i have a main
MFC
MDI application composed of some DLL components. One of these components
is
shared by more than one main application and it has a same behavior that a
MFC MDI application (open, save and close documents). So I want to build
this component into DLL to can share it between the two applications and
not
use simply "shellExecute" because with this solution there isn't
integration
between the component and the main application.
I hope that I'm clear now and i hope that i found a solution to this
problem.

Thanks
Aa

"Joseph M. Newcomer" <newco...@xxxxxxxxxxxx> a écrit dans le message
denews:820rs3du2otjc21r7jgd6suj60cibjtu57@xxxxxxxxxx

> An application can't be "converted" to a DLL. DLLs are DLLs, and
> applications are
> applications. There is no conceivable way you can convert an "MDI
> application" to a DLL;
> it doesn't even make sense; it is like saying "I tried to make
> applesauce
> out of oranges,
> and I can't find a way to do it"

> What do you want the DLL to do? It *is* reasonable to do things such as
> put a document
> class, a view class, or both, in a DLL (as an extension DLL, typically),
> but that's about
> as far as you can go. To be a DLL, it would have to be used in the
> context of another
> application, and it makes no sense to embed a CMainFrame in a DLL if it
> is
> going to be
> used in the context of another CMainFrame environment.

> You can "embed" one app in another, by using OLE embedding; but this is
> a
> very challenging
> undertaking, not at all something to do as a beginning project.
> joe

> On Tue, 4 Mar 2008 11:28:46 +0100, "AYARA Adel" <adel.ay...@xxxxxxxxxxx>
> wrote:

>>Hi,

>>I have an MFC MDI application that i want to convert into DLL. I tried
>>the
>>three types of MFC DLL but i can't have my MDI application. In fact, i
>>want
>>to add an export function to my dll that be called by other application
>>(not
>>MFC and not C++) wich run my MDI application embedded into the dll. How
>>can
>>i do it ?

>>thanks
>>Aa

> Joseph M. Newcomer [MVP]
> email: newco...@xxxxxxxxxxxx
> Web:http://www.flounder.com
> MVP Tips:http://www.flounder.com/mvp_tips.htm

.



Relevant Pages

  • Re: Show Dialog from MFC Extension DLL
    ... and used by both MFC applications as well as non-MFC applications. ... I simplify things by exporting a non-MFC class that "represents" my dialog. ... file that has no MFC in it, so they aren't exposed to it (this is what allows ATL and console applications to use the DLL to show the dialog). ...
    (microsoft.public.vc.mfc)
  • Re: Simple Input In a MFC application
    ... other MFC programmers have followed parallel lines to augment the MFC in a ... either distributing an extra dll or having to include resources in calling ... which is why I'd use a DLL ... Place an edit control on the dialog ...
    (microsoft.public.vc.mfc)
  • Re: Soft Input Panel SIP
    ... is without MFC support. ... I tried to setup a new projekt Win32 Smart Device Projekt -- DLL add ... // DllGetClassObject - Exported function called to get pointer to ... STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv) { ...
    (microsoft.public.windowsce.app.development)
  • Re: Soft Input Panel SIP
    ... It looks like you are trying to create a dll with MFC statically linked. ... If you are you should start with the MFC wizard and create an "MFC DLL" project, instead of trying to paste MFC into a working non-MFC project. ... STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv) { ... IsEqualIID ) { ...
    (microsoft.public.windowsce.app.development)
  • Re: Soft Input Panel SIP
    ... Does your device have the MFC DLL installed? ... STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv) { ... IsEqualIID ) { ...
    (microsoft.public.windowsce.app.development)

Loading