Solved

modeless dialogs

Posted on 1998-12-04
2
217 Views
Last Modified: 2013-11-20
hi regards!
i already asked this question, but i didn't get convincing reply. Please do explain modeless dialog, the arguments
passed to it's create member function. Please cite an
example. Is it a must to allocate dynamically the memmory for modeless dialogs ? ..................
0
Comment
Question by:sunraj
2 Comments
 
LVL 4

Accepted Solution

by:
pagladasu earned 50 total points
Comment Utility
The no arguments passed into the Create() function of a modeless dialog box are two. The first one is an unsigned integer, representing the ID value of the dialog box. The second argument is a pointer to the parent window.
Here is an example which displays a modeless dialog box:

CMyDiaog *m_pdlg=new CMyDialog;
m_pdlg->Create(IDD_MYDIALOG,this);

When you are using the Create method, it is recommended to create it on the heap. However, using other methods, you can still create modeless dialog boxes without using a pointer.
Thanks
pagladasu.
0
 

Expert Comment

by:ramrocket
Comment Utility
You must also override CDialog::PostNcDestroy()

void CMyDialog::PostNcDestroy()
{
  delete this;
}

so you dont need to explicitly delete m_pdlg
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 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

16 Experts available now in Live!

Get 1:1 Help Now