1)why we cant create more than one instance of the class
Derived from CWinApp
Answers were Sorted based on User's Feedback
Answer / shanmuga
Becoz,through the CWinApp object only ,the application
starts.. If there exist more than one object there occurs a
conflict to proceed with which object.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / narayan
You theApp object is replace with new name;
Eg
CdlgtestApp theApp;
CdlgtestApp theApp3; // now this is your applcation obj
CdlgtestApp theApp3;
CdlgtestApp theApp; // No effect
| Is This Answer Correct ? | 6 Yes | 4 No |
Answer / jdp
Because the CWinApp class encapsulates the main() method
which, as you know, there can be only one instance of in
any application.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / deepesh
because in constructor of CWinApp class
if it will called twice
ASSERT(AfxGetThread() == NULL);
will cause run time assertion
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sirama
Because MFC implemented it as Singleton CWinApp::Ctor.
| Is This Answer Correct ? | 2 Yes | 7 No |
Which MFC function is used to display output?
What is CALLBACK? How it work? what is the advantage of CALLBACK, please explain with an example
In MFC By Using Communication Between Dialog Boxes,How Can We Send Message Of one Dialog Box To Another Dialog.?
3 Answers Financial Technologies,
What is the base class for MFC Framework ?
1)How to change a text of a button in runtime?
What interface must be supported by an ActiveX control?
What is document-view architecture ? Give me one real time example for SDI ?
what is functioning of DIalodDataXchange ..?
What is primitive and non-primitive application?
What?s the difference between Modal and Modeless Dialog?
Does the application have more than one object? If Yes, Briefly explain.
Differ GetMessage, PostMessage & PeakMessage?