Accessing MFC DLL from a non-MFC application 
Author Message
 Accessing MFC DLL from a non-MFC application

I want to convert an MFC application to an MFC DLL and use that DLL in a
non-MFC application. The first part (actually converting it) is fairly
straightforward. The tricky part is that I want to call one of the DLL's
exported functions from a non-MFC application.  The problem is that the
calling application is supposed to own the message pump, right? However, the
calling application does not create any windows itself, and therefore does
not have a message pump. So how do I get my main window (defined in the DLL)
to come up and start processing messages? Does anyone have any good examples
of this?

For example, I might want to have a very simple program like following that
calls the main function from my MFC DLL:

main()
{
    //Do some stuff

    DisplayMfcGui();        //Bring up the main window using the MFC DLL

    //Do some more stuff

Quote:
}

Thanks in advance,
Stef


Sat, 30 Jun 2001 03:00:00 GMT  
 Accessing MFC DLL from a non-MFC application

Stef Schurman schrieb in Nachricht ...

Quote:
>I want to convert an MFC application to an MFC DLL and use that DLL in a
>non-MFC application. The first part (actually converting it) is fairly
>straightforward. The tricky part is that I want to call one of the DLL's
>exported functions from a non-MFC application.

Stef,
actually you are misrepresenting your problem. It is mainly about using
Win32 from a console mode application. Is there a specific reason why you
want to do this?

Probably the easiest approach would be changing the console mode application
to a windows application.

HTH Andreas



Sun, 01 Jul 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CAsyncSocket in an MFC DLL used in a non-MFC Application

2. Loading a static-mfc-dll using ocx in a non-mfc application

3. Using a MFC DLL in a non-MFC application

4. loading an MFC DLL that was originally an extension dll from a non MFC dLL

5. Adding MFC-code to a non MFC Application(WIN-application)

6. Database Access in NON MFC Application

7. Database access in a Non MFC application

8. set_new_handler in non MFC library called from MFC application

9. Adding MFC support to my non-MFC application

10. How can you access an MFC object from a Non-MFC Thread

11. Adding MFC to non-MFC Application

12. Non MFC modal dialogs in an MFC application - Dialog Message problem

 

 
Powered by phpBB® Forum Software