🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: microsoft.public.vc.ide_general
Article #7

Re: Using VC++ from a C++Builder perspective

#7
From: Jason W. Hinson
Date: Fri, 12 Nov 2004 22:37
38 lines
2693 bytes
In article <ejgc6HMyEHA.3120@TK2MSFTNGP12.phx.gbl>,
 "Filip Konvicka" 
 <filip.konvicka.remove_this_antispam_token_please@logis.cz> wrote:

> Jason,
> 
> personally I think that the "simply-set-a-member" approach is rather
> confusing, and indeed delphish. A single assignment looks as though it is an
> atomic operation, but it is in fact calling a cascade of functions... in my
> opinion this leads to much less efficient code, because you re-read or
> re-set the attributes more often (instead of caching the values). Not only
> that - the example you provided suggests that instead of calling 1 function
> to set window position, you do 4 "assignments" (which are no doubt
> implemented by calling the aforementioned function 4 times!) But, all this
> is just my opinion. I think that it's a good thing for you to learn the
> WIN32 API or the (more or less thin) MFC wrapper so that in the end you can
> use the API more efficiently. In VC++, I think that you have no other choice
> anyway :-)
> 
> Best Regards,
> Filip
...

Hi, Filip, and thanks for the reply.

I certainly don't have problem with non-delphish approaches or with 
making a single call with multiple variables rather than several 
individual assignments if that's a more efficient way to do things.  I 
just like the idea of everything involving member functions of a given 
object like someComponent->SetPosition(x,y,width,height), for example.

Another poster (who I'll reply to next) showed an example I found quite 
nice in which he created a CEdit object and called its member functions 
to play around with its settings--not too bad from my perspective (at 
least with that example).


-Jason
Technical Details
Message-ID: <hinson-B0BDDE.16370312112004@news.east.cox.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!cox.net!news-xfer.cox.net!p01!lakeread04.POSTED!53ab2750!not-for-mail
References: <hinson-6E84C1.18360311112004@news.east.cox.net> <ejgc6HMyEHA.3120@TK2MSFTNGP12.phx.gbl>

Show Full Headers
Complete Article Headers
X-Google-Thread: f707b,2ac2be6d0340ebc1
X-Google-Thread: f5c5c,2ac2be6d0340ebc1
X-Google-Attributes: gidf707b,gidf5c5c,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!cox.net!news-xfer.cox.net!p01!lakeread04.POSTED!53ab2750!not-for-mail
From: "Jason W. Hinson" <hinson@physicsguy.com>
Newsgroups: microsoft.public.vc.ide_general,borland.public.cppbuilder.vcl.components.using
Subject: Re: Using VC++ from a C++Builder perspective
References: <hinson-6E84C1.18360311112004@news.east.cox.net> <ejgc6HMyEHA.3120@TK2MSFTNGP12.phx.gbl>
User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X)
Message-ID: <hinson-B0BDDE.16370312112004@news.east.cox.net>
Lines: 38
Date: Fri, 12 Nov 2004 16:37:03 -0600
NNTP-Posting-Host: 68.105.58.247
X-Complaints-To: abuse@cox.net
X-Trace: lakeread04 1100299024 68.105.58.247 (Fri, 12 Nov 2004 17:37:04 EST)
NNTP-Posting-Date: Fri, 12 Nov 2004 17:37:04 EST
Organization: Cox Communications