Re: Preventing pasting in a TEdit

not_at_any.adr
Date: 08/05/04


Date: Thu, 05 Aug 2004 00:36:48 -0400

On Wed, 04 Aug 2004 22:13:54 -0500, Rob Kennedy <me3@privacy.net> wrote:

>not@any.adr wrote:
>> On Wed, 04 Aug 2004 14:02:58 -0500, Rob Kennedy <me3@privacy.net> wrote:
>>>Have you ever looked in the Controls.pas unit?
>>
>> Yep.
>
>Sure fooled me. Claiming it's not possible to override WndProc, and all.

I never said it wasn't possible, Rob. What I said was the Delphi is
subclassing the controls very heavily already.

>> Yep... that's Borland subclassing the windows edit control. Adding a couple
>> of hundred kb of code to something I can do in less than a k...
>
>What part of the code are you objecting to?

None of it... I think we're debating at crossed purposes here. I'm not
dumping on Delphi... I'm talking about how it actually works.

>Just how much of the VCL's
>functionality do you claim to be able to provide in 1024 bytes of code?

Hmmmm... huge chunks of the VCL's functionality is dormant in most
applications... i.e. you could do the same job with big chunks of code
removed. As it is set up the entire class and all it's ancestors have to be
linked into each and every program for any control to work. (typically 40 to
100k)

At the api level you only include the needed functionality and thus need a few
hundred bytes to subclass the control and a few bytes to call the control in
it's DLL (if memory serves this is less than 40 bytes).

Just about any program you can write in a meg by RAD/VCL/OOP methods, I can do
in under 100k by procedural methods. That's a huge pile of code linked in
with no real increase in functionality at all.

>And how easy will it be for others to take advantage of your work when
>writing descendants of your classes?

I don't write classes. I write traditional pascal units... using them is as
easy as adding them to your Uses list and calling the functions in the
interface sections.

As I explained before I'm something of an anachronism in the programming world
as I still program 99% by procedural methods.

>When you write controls, do you call SetWindowLong or override
>CreateParams to provide your own window procedure? I have never seen
>that in any other control (except of course for TWinControl).

Generally I use setwindowlong.

Do you remember the "HelloWorld" example I posted? That's how I work, right
down and dirty with winapi calls. I don't even load the VCL, objects or
Classes units most of the time. (Why do you think I wanted the SEH to work
without exception objects?)

>Writing descendant controls is done all the time, but that does not
>require the developer to know anything about Windows subclassing. The
>subclassing takes place in the ancestor control, behind the scenes.

My point exactly... It's programming without really knowing what code you are
generating. I view this as "less than optimal" because I definitely like
knowing exactly what's going on in my code.

-----
Laura



Relevant Pages

  • Re: Displaying default item in empty JList
    ... I also looked at subclassing the JList to intercept intervalAdded and ... intervalRemoved messages, but as far as I can see, the functionality I want ... to alter is controlled by a separate class in the ... to control the enabled state of the JList. ...
    (comp.lang.java.gui)
  • Re: Tried Out Delphi 2006
    ... one thing that since D3 has been unbelievably awesome about Delphi is ... that you can create any functionality you want as a TWinControl descendant, ... control. ... ActiveX controls for the rest of the world. ...
    (borland.public.delphi.non-technical)
  • Re: HELP I am about to quit on AS2005
    ... I miss Undo/Redo functionality in VS2005. ... make comlex involving stuff a breeze, but at the expense of control on the ... I feel the MDX syntax needs more ... SQL server manager managegement studio and MDX for data access. ...
    (microsoft.public.sqlserver.olap)
  • Re: HelpScribble/context sensitive
    ... then clicking a control opens up the help document. ... sensitive help with applications developed in Borland Delphi, we have received a number of support requests asking how to connect a help file to a Delphi 2005 application. ... To use an HTML Help .chm file, you will need to download the file ... HelpScribble 7.4.0 installs two packages, HelpCtxD2005win and HelpCtxD2005net into Delphi 2005. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: HelpScribble/context sensitive
    ... then clicking a control opens up the help document. ... sensitive help with applications developed in Borland Delphi, we have received a number of support requests asking how to connect a help file to a Delphi 2005 application. ... To use an HTML Help .chm file, you will need to download the file ... HelpScribble 7.4.0 installs two packages, HelpCtxD2005win and HelpCtxD2005net into Delphi 2005. ...
    (borland.public.delphi.thirdpartytools.general)