Solved

How to make Dialog based app to Modeless

Posted on 2000-04-05
3
149 Views
Last Modified: 2013-11-20
I want to make the AppWizard created dialog based application into modeless dialog based application. I've created the dialog using create function it is creating the dialog and displaying the dialog but it is not been persisted but it is closing the application immediately. How to the retain the application from closing?
0
Comment
Question by:imtiazahmad
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 10 total points
ID: 2689068
don't return FALSE from InitInstance
0
 

Author Comment

by:imtiazahmad
ID: 2689996
It's not working
I tried with returning TRUE. The application is being terminated due to this.
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2690233
hmm have you set the main window to be that of your modeless dialog (see pseudo code)

CYourApp::InitInstance()
{
....
// create modeless dialog
CModeless *pWnd=new CModeless;
pWnd->Create(...);
m_pMainWnd = pWnd;

return TRUE;
}
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

12 Experts available now in Live!

Get 1:1 Help Now