Solved

Messages not handled when creating modeless dialog

Posted on 1998-12-18
2
262 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 50 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

705 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