Solved

RUNTIME_CLASS

Posted on 1998-11-02
2
492 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
[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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Whole sheet autoscrub still needed 19 53
Expand to include initial dialog with two choices. 9 86
MaxSpan challenge 9 124
c++  placing data into a form and an editbox 5 23
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.

749 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