Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionretrieve email password on local host? Pin
Gofur Halmurat3-Oct-07 12:36
Gofur Halmurat3-Oct-07 12:36 
AnswerRe: retrieve email password on local host? Pin
Mark Salsbery3-Oct-07 13:03
Mark Salsbery3-Oct-07 13:03 
AnswerRe: retrieve email password on local host? Pin
Stephen Hewitt3-Oct-07 14:44
Stephen Hewitt3-Oct-07 14:44 
AnswerRe: retrieve email password on local host? Pin
Maximilien3-Oct-07 15:37
Maximilien3-Oct-07 15:37 
QuestionLinking to MFC in a non-MFC dll [modified] Pin
Leslie Sanford3-Oct-07 9:45
Leslie Sanford3-Oct-07 9:45 
AnswerRe: Linking to MFC in a non-MFC dll Pin
Nathan Holt at EMOM3-Oct-07 10:49
Nathan Holt at EMOM3-Oct-07 10:49 
AnswerRe: Linking to MFC in a non-MFC dll Pin
Mark Salsbery3-Oct-07 11:31
Mark Salsbery3-Oct-07 11:31 
GeneralRe: Linking to MFC in a non-MFC dll Pin
Leslie Sanford3-Oct-07 13:59
Leslie Sanford3-Oct-07 13:59 
Mark Salsbery wrote:
This Link[^] has info on choosing MFC DLL types and for
each type, info on proper initialization.


Thanks, Mark. That link is very informative.

Since MFC defines it's own DLLMain, I have to get rid of the one provided by the third-party library I'm using for this project. I don't like doing that because it means altering the source code, but I can live with it if it means getting things compiled.

Another problem is that host applications that use my dll pass it an HWND handle. I'm suppose to use this as a parent window and instantiate a child window. This child window provides a UI for interacting with the synth my dll represents. This UI resides within a window displayed by the host application.

However, from the link above:

If the DLL opens modeless dialogs or has a main frame window of its own, the application's main 
message pump must call a routine exported by the DLL that in turn calls the 
CWinApp::PreTranslateMessage member function of the DLL's application object.


I'm not sure I understand the above, but if it means that I have to require the host application to call a specified function in my dll, all bets are off. I can't make that requirement as the protocol for how hosts and dlls interact within the domain I'm working in is already set. I'm in no position to require a host to do anything.

My attempts to instantiate a CDialog derived class have failed. I've tried using CWnd::FromHandlePermanent to incapsulate the HWND handle given to me by the host application in order to pass it to the CDialog's constructor. But CWnd::FromHandlePermanent returns NULL.

So I may have bet on the wrong horse in using MFC for this project. My goal was to leverage MFC's classes in building a GUI exported from my dll. I may need to do a major rewrite.
GeneralRe: Linking to MFC in a non-MFC dll Pin
Mark Salsbery4-Oct-07 5:40
Mark Salsbery4-Oct-07 5:40 
GeneralRe: Linking to MFC in a non-MFC dll Pin
Leslie Sanford4-Oct-07 6:25
Leslie Sanford4-Oct-07 6:25 
GeneralRe: Linking to MFC in a non-MFC dll Pin
Mark Salsbery4-Oct-07 6:43
Mark Salsbery4-Oct-07 6:43 
GeneralRe: Linking to MFC in a non-MFC dll Pin
Leslie Sanford4-Oct-07 6:56
Leslie Sanford4-Oct-07 6:56 
GeneralRe: Linking to MFC in a non-MFC dll Pin
Mark Salsbery4-Oct-07 7:11
Mark Salsbery4-Oct-07 7:11 
GeneralRe: Linking to MFC in a non-MFC dll Pin
Leslie Sanford4-Oct-07 7:48
Leslie Sanford4-Oct-07 7:48 
GeneralRe: Linking to MFC in a non-MFC dll Pin
Mark Salsbery4-Oct-07 7:54
Mark Salsbery4-Oct-07 7:54 
GeneralRe: Linking to MFC in a non-MFC dll Pin
Mark Salsbery4-Oct-07 6:48
Mark Salsbery4-Oct-07 6:48 
QuestionJump from one Dialog to other in a Dialog MFC application Pin
TomWizard3-Oct-07 7:59
TomWizard3-Oct-07 7:59 
AnswerRe: Jump from one Dialog to other in a Dialog MFC application Pin
Maximilien3-Oct-07 9:13
Maximilien3-Oct-07 9:13 
Questiontokenizer help Pin
dellthinker3-Oct-07 7:14
dellthinker3-Oct-07 7:14 
AnswerRe: tokenizer help Pin
Nemanja Trifunovic3-Oct-07 7:44
Nemanja Trifunovic3-Oct-07 7:44 
GeneralRe: tokenizer help Pin
dellthinker3-Oct-07 9:37
dellthinker3-Oct-07 9:37 
AnswerRe: tokenizer help Pin
Stephen Hewitt3-Oct-07 14:23
Stephen Hewitt3-Oct-07 14:23 
AnswerRe: tokenizer help Pin
DQNOK4-Oct-07 4:30
professionalDQNOK4-Oct-07 4:30 
GeneralRe: tokenizer help Pin
dellthinker4-Oct-07 8:27
dellthinker4-Oct-07 8:27 
QuestionSidebar like Vista sidebar for all os Windows 2000, XP , 2003 Pin
Sudhir Mangla3-Oct-07 5:18
professionalSudhir Mangla3-Oct-07 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.