Solved

Modeless dialogs

Posted on 1998-05-21
8
264 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

746 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

9 Experts available now in Live!

Get 1:1 Help Now