CWinApp <-> DLL communication
-
Hi there everyone, So I have my DLL that needs to communicate with my app. What I want to do is have the dll send my CWinApp derived class a message, and then the CWinApp should call
DoModal
with the dialog. Problem is, I've never messed with the app part of mfc, only the dialog class, so I have no clue how to set up the handler for the message. As well, since there is nohWnd
yet, I need to usePostThreadMessage
instead of the normalSendMessage
, but in my DLL I need to get the return value and then continue processing (like there would be withSendMessage
/DefWindowProc
). Any help on how to do so would be nice. ^^ :) -
Hi there everyone, So I have my DLL that needs to communicate with my app. What I want to do is have the dll send my CWinApp derived class a message, and then the CWinApp should call
DoModal
with the dialog. Problem is, I've never messed with the app part of mfc, only the dialog class, so I have no clue how to set up the handler for the message. As well, since there is nohWnd
yet, I need to usePostThreadMessage
instead of the normalSendMessage
, but in my DLL I need to get the return value and then continue processing (like there would be withSendMessage
/DefWindowProc
). Any help on how to do so would be nice. ^^ :)Sounds like you might have the tail wagging the dog. How is your DLL getting control and "running" to be able to control the application?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
-
Sounds like you might have the tail wagging the dog. How is your DLL getting control and "running" to be able to control the application?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
-
And when you get the address of the proc in the DLL, I assume you call it? Are you trying to do some kind of plug and play system where you can have a different window depending on which DLL you load? Why not just have a call into the DLL to create the dialog and then return?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
-
And when you get the address of the proc in the DLL, I assume you call it? Are you trying to do some kind of plug and play system where you can have a different window depending on which DLL you load? Why not just have a call into the DLL to create the dialog and then return?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.