Solved

Modeless dialogs

Posted on 1998-05-21
8
270 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
[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
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
Independent Software Vendors: 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!

 
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

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

688 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