Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC6 C++ MFC VC++
I need a functionality to be used by two MFC Applications.
 
This functionality requires a GUI Window that manipulates user events and data at the background
 
Using a Dll to implement the functionality will not help since the functionality requires GUI and hence windows and resource files need to be created.
 
If I implement the functionality using an exe and call the exe in two applications, then I also need data to send to and fro the two applications (which are exes) at runtime.
 
Kindly help me and suggest me some detailed ideas and references how to achieve my requirement
Posted 12-Feb-13 1:40am
Comments
Matthew Faithfull at 12-Feb-13 7:43am
   
Why is using a DLL giving you problems? It is the right way to share functionality between applications. I would focus on what's preventing you from getting that solution to work.
nv3 at 12-Feb-13 8:15am
   
Why do you think that when your functionality has also GUI components that precludes the use of a DLL? You can have resources in a DLL as well. In fact, some people use DLLs just to distribute various resources.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I don't get what's the incompatibility between DLLs and windows. Who told you you cannot have windows created from DLLs?
 
You should create an MFC extension DLL and put your functionality there, exporting what needs to be used from the client applications.
 
Of course, you always have alternatives. For instance you can create an out-of-proc COM server that implements that functionality and communication between the processes (your app and the COM server) done through COM. However, I really see no point in going for something like this.
  Permalink  
Comments
Albert Holguin at 12-Feb-13 11:24am
   
I would recommend the dll method as well... +5
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

I place GUIs in dlls all the time... you just have to set the resources handle correctly when you create the windows within the dll and everything else pretty much works the same.
 
Here's some info:
http://stackoverflow.com/questions/3577818/mfc-app-loading-dialog-from-another-dll[^]
http://www.ucancode.net/Visual_C_MFC_Samples/Export-dialog-to-mfc-extension-dll.htm[^]
 
I'm sure if you look into MFC extension dlls you'll find relevant information.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
Can you try with SendMessage /PostMessage. You can also create a NamePipe for this communication.
 
Best Regards
Muthuraja
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 404
1 OriginalGriff 369
2 Sergey Alexandrovich Kryukov 158
3 CPallini 145
4 Hard_Rockz 85
0 OriginalGriff 5,634
1 Sergey Alexandrovich Kryukov 4,763
2 Peter Leow 2,954
3 Maciej Los 2,614
4 DamithSL 2,465


Advertise | Privacy | Mobile
Web03 | 2.8.140718.1 | Last Updated 12 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid