Solved

RUNTIME_CLASS

Posted on 1998-11-02
2
473 Views
Last Modified: 2013-11-20
I derived CMyThread from CWinThread. Does RUNTIME_CLASS can create an object whose constructor has parameter? For example:
CMyThread : public CWinThread
{
 DECLARE_DYNAMIC(CMythread)
protected:
CMyThread(Object *);
~CMyThread();
}

Also, another question is that: when I use RUNTIME_CLASS to create ab object , does that mean I do not need to use "delete" to delete the object?

Thanks.
0
Comment
Question by:jonalee
2 Comments
 
LVL 12

Accepted Solution

by:
migel earned 100 total points
ID: 1324149
RUNTIME_CLASS not support creation of the objects with no default constructor (constructor without parameters). See declaration of the _IMPLEMENT_RUNTIMECLASS macro in the afx.h.
Creation objects with RUNTIME_CLASS uses new operator so you need to destroy created object manually.
0
 
LVL 1

Expert Comment

by:TheGrinch
ID: 1324150
RUNTIME_CLASS does not create objects. Read Help.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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