[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Modeless dialogs

Posted on 1998-05-21
8
Medium Priority
?
273 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 150 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Industry Leaders: 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

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…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

872 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