Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Messages not handled when creating modeless dialog

Posted on 1998-12-18
2
Medium Priority
?
278 Views
Last Modified: 2013-11-20
I am trying to create a modeless dialog within an ATL object using MFC.   If I call the CDialog::DoModal() method everything works fine.  All messages that I need are handled and the window works fine.

If I call CDialog::Create() however, I don't seem to get the chance to handle the standard messages like PreTranslateMessage or OnDestroy.  Why is this and how do I fix it?

0
Comment
Question by:tdietz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Expert Comment

by:Nevering
ID: 1326403
Is this an override class of CDialog, if so can you show some of the code.  It's possible that the message map may be messed up.
0
 
LVL 3

Accepted Solution

by:
shaig earned 100 total points
ID: 1326404
My guess is that the dialog is a temporary in a calling function.
when the scop of the calling function ends, the dialog die's.
The create function unlike DoModal returns imidiatly after creating the dialog rather then after it has been destroyed.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question