Solved

Messages not handled when creating modeless dialog

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ADO Memory leak with DELPHI 2007 37 170
only14 challenge 19 68
canBalance challenge 34 69
unix example issues 18 73
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now