Solved

Messages not handled when creating modeless dialog

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cat dog challenge 18 124
iSeries DB2 Query 2 95
twoTwo  challenge 35 101
scoreUp challenge 14 62
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 …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 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