Re: Why Dynamic Class is required?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Joseph M. Newcomer (newcomer_at_flounder.com)
Date: 02/24/04


Date: Tue, 24 Feb 2004 12:05:54 -0500

Well, creating an instance of the class at compile time doesn't do much good, since you
probably aren't running your app from the compiler. Sort of like the question
        a = b + c;
\why isn't the arithmetic done at compile time?
                                        joe

On Tue, 24 Feb 2004 15:36:59 +0530, "Debasish Pramanik" <debasish.pramanik@assetlink.com>
wrote:

>Dear All,
>
>In InitInstance for a SDI application we use code such as
>
>CSingleDocTemplate *pDoc =
>
>new CSingleDocTemplate(0,
>RUNTIME_CLASS(CMYDoc),
>RUNTIME_CLASS(CMYFrameWnd),
>RUNTIME_CLASS(CMYView));
>
>Why to create the objects at runtime why not at compile time?
>
>Regards,
>Debasish Pramanik
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm



Relevant Pages

  • Re: Strong Names and LGPL
    ... that wasn't signed at compile time since the PE file will have an incorrect ... > William Stacey, MVP ... >> The library is not strong named for that reason. ...
    (microsoft.public.dotnet.security)
  • Re: C# to C++
    ... typeofresolves the typename to a token at compile time, ... whereas Type::GetType requires a lookup by name at runtime. ... Mattias Sjögren [MVP] mattias @ mvps.org ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Dynamic discovery of delegates
    ... If you want to dynamically create a delegate of a type that's unknown ... at compile time, use System.Delegate.CreateDelegate. ... Mattias Sjögren [MVP] mattias @ mvps.org ...
    (microsoft.public.dotnet.languages.vb)
  • Re: trees
    ... What sort of language is it, and what sort of ng is this, where people ... Socialism would work, but as the 1930s wore on, fear of saying the ... the type and replace sizeof with the proper integer at compile time. ...
    (comp.lang.c)
  • Re: Newbie Q: How can I evaluate a form?
    ... > like an obvious sort of indirection to use every now and then. ... according to the normal evaluation rules of the language. ... be known at compile time (e.g. a user is going to type arbitrary forms ...
    (comp.lang.lisp)