Solved

How to make Dialog based app to Modeless

Posted on 2000-04-05
3
160 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
[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
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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Tab names are off by one 5 54
How to know only "File created" with EventLog 3 35
Problem to event 3 122
How do I get Window Title of all opened process? 4 60
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

732 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