Solved

Modeless dialogs

Posted on 1998-05-21
8
267 Views
Last Modified: 2010-04-10
Can modeless dialogs be activated from CMainFrame?  I have created a modeless dialog which I can easily activate from my CView class.  However I would like to call it from CMainFrame, and I keep getting various run time errors.  Any suggestions?
0
Comment
Question by:jerm
8 Comments
 

Expert Comment

by:jann
ID: 1164440
If you use CFormView to build a modeless dialog, you can easily activate it through CMainFrame.
0
 
LVL 3

Accepted Solution

by:
tma050898 earned 50 total points
ID: 1164441
Jerm,

Yes, it is very easy to create modeless dialogs and use them from CMainFrame. Instead of copying and pasting the article, take a look at Q103788. It explains the steps necessary as well as some pitfalls to be aware of.

HTH,
Tom


0
 

Author Comment

by:jerm
ID: 1164442
Please excuse me for being slow, but what is Q103788 and where can I find it?
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 10

Expert Comment

by:RONSLOW
ID: 1164443
How about you tell us what errors you are getting.  Also try running in debug mode.

It should make no difference from where you start your modeless dialog.  What _does_ matter is the scope and lifetime of the modeless dialog class object (ie when you create and delete it).

0
 
LVL 3

Expert Comment

by:tma050898
ID: 1164444
jerm,

Sorry. Q103788 refers to a MS Knowledge Base article. It can be found on the MSDN by doing a search. Remember to uncheck the Search Title Only check box. Instead of posting the different errors that you are getting, I would suggest that you take a look at this article FIRST and make sure that you are doing everything per the article's isntructions. THEN, if you find that you are doing everthing correctly, post the exact errors that you are getting. That way I (or any other experts) can help you.

Tom

0
 
LVL 3

Expert Comment

by:tma050898
ID: 1164445
BTW, generally speaking, RONSLOW is correct in that the quality of the answers you receive is directly proportional to the detail included in the question itself.

However, in this particular case (since modeless dialogs are very easy to program), I believe that once you take a look at the KB article, you will see what you are doing wrong.

Tom

0
 

Author Comment

by:jerm
ID: 1164446
Thanks for the answers.  The KB suggestions worked fine.  I actually had the dialog box working fine, but it was being called from my CView class and I needed it to be called from CMainFrame.  Not exactly sure what the major difference is, but that is another question.
0
 
LVL 3

Expert Comment

by:tma050898
ID: 1164447
Is it working from CMainFrame now?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

813 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