Solved

Modeless dialogs

Posted on 1998-05-21
8
265 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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…

911 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

21 Experts available now in Live!

Get 1:1 Help Now