Click here to Skip to main content
16,005,236 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Executing EXE from Memory? Pin
David Crow11-Jun-04 2:10
David Crow11-Jun-04 2:10 
GeneralRe: Executing EXE from Memory? Pin
NodeX11-Jun-04 5:10
NodeX11-Jun-04 5:10 
GeneralRe: Executing EXE from Memory? Pin
David Crow11-Jun-04 5:32
David Crow11-Jun-04 5:32 
GeneralRe: Executing EXE from Memory? Pin
NodeX11-Jun-04 5:39
NodeX11-Jun-04 5:39 
GeneralRe: Executing EXE from Memory? Pin
David Crow11-Jun-04 6:23
David Crow11-Jun-04 6:23 
GeneralRe: Executing EXE from Memory? Pin
Alexander M.,11-Jun-04 7:09
Alexander M.,11-Jun-04 7:09 
AnswerRe: Executing EXE from Memory? Pin
bikram singh10-Jun-04 18:16
bikram singh10-Jun-04 18:16 
GeneralModeless Dialog in DLL: Message Confusion Pin
Justin Cooke10-Jun-04 11:31
Justin Cooke10-Jun-04 11:31 
Greetings All,

I've been burning up all of my time over the past two days trying to debug this. Please help!

I've written a DLL that creates a modeless dialog (in this case allowing the user to watch an aiming video image of a Laser Tracker.) This DLL is used by various client applications including my test app.

I need the user to be able to use the arrow keys to "jog" the Tracker from the dialog. Also, all of the normal dialog keyboard control needs to work (tabbing, typing into CEdit boxes, etc.)

At first, I couldn't even get key messages in the dialog...as soon as a key was pressed (with focus on the dialog), the message came to the client app. I found a way to fix this from MS' website involving having the app call a FilterDLLMsg() func from its PreTranslateMessage(). However, now when a key is pressed in the dialog, the dialog and app freeze.

I spent a long time tracing this freeze and it seemed to be freezing around the MFC code for _AfxFindNextMnem. I was stumped and thought it had to do with a tabstop or group setting for my dialog controls. Then I tried changing the m_pMainWnd = &dlg; line in my client application's InitInstance() to m_pMainWnd = NULL;. (It's a dialog based app.)

That corrected the freeze problem, but now any AfxMessageBoxes() I call from my client app seem to belong to the desktop instead of the main app dialog. There may be other, more serious, ramifications, but I haven't tested any further.

So, I don't want to change the m_pMainWnd = &dlg; if I don't have to, but for now, it's the only way I've found to keep the DLL/app from freezing. Is that safe? I'd prefer a different solution.

Has anyone out there ever seen this type of behavior? Any ideas? My brain is getting all mushy Unsure | :~ as I haven't made much progress on thisConfused | :confused:

Thanks,
Justin
GeneralRe: Modeless Dialog in DLL: Message Confusion Pin
bikram singh10-Jun-04 19:02
bikram singh10-Jun-04 19:02 
GeneralKeeping Menu Open Pin
cje10-Jun-04 11:29
cje10-Jun-04 11:29 
GeneralRe: Keeping Menu Open Pin
bikram singh10-Jun-04 14:43
bikram singh10-Jun-04 14:43 
GeneralHelp-Data Transfer Pin
Design1863010-Jun-04 11:04
Design1863010-Jun-04 11:04 
GeneralRe: Help-Data Transfer Pin
bikram singh10-Jun-04 19:20
bikram singh10-Jun-04 19:20 
GeneralRe: Help-Data Transfer Pin
Design1863011-Jun-04 4:46
Design1863011-Jun-04 4:46 
GeneralGUI and data extraction with C++ Pin
stacey_cool10-Jun-04 10:36
stacey_cool10-Jun-04 10:36 
GeneralRe: GUI and data extraction with C++ Pin
alex.barylski10-Jun-04 10:40
alex.barylski10-Jun-04 10:40 
QuestionDisplaying Text in an App ... Simple, right? Pin
mike-o10-Jun-04 10:20
mike-o10-Jun-04 10:20 
AnswerRe: Displaying Text in an App ... Simple, right? Pin
alex.barylski10-Jun-04 10:39
alex.barylski10-Jun-04 10:39 
GeneralRe: Displaying Text in an App ... Simple, right? Pin
mike-o10-Jun-04 11:03
mike-o10-Jun-04 11:03 
AnswerRe: Displaying Text in an App ... Simple, right? Pin
David Crow10-Jun-04 10:59
David Crow10-Jun-04 10:59 
GeneralRe: Displaying Text in an App ... Simple, right? Pin
mike-o10-Jun-04 11:07
mike-o10-Jun-04 11:07 
AnswerRe: Displaying Text in an App ... Simple, right? Pin
Johan Rosengren10-Jun-04 21:21
Johan Rosengren10-Jun-04 21:21 
GeneralOOP problem with MFC Pin
Anonymous10-Jun-04 8:13
Anonymous10-Jun-04 8:13 
GeneralRe: OOP problem with MFC Pin
Johan Rosengren10-Jun-04 8:32
Johan Rosengren10-Jun-04 8:32 
GeneralRe: OOP problem with MFC Pin
Anonymous10-Jun-04 8:53
Anonymous10-Jun-04 8:53 

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.