Re: Preventing pasting in a TEdit
not_at_any.adr
Date: 08/04/04
- Next message: J French: "Re: teaching a child - console or GUI"
- Previous message: Maarten Wiltink: "Re: How to do this. Search and list HD or CD?"
- In reply to: Maarten Wiltink: "Re: Preventing pasting in a TEdit"
- Next in thread: Jeremy Collins: "Re: Preventing pasting in a TEdit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 04 Aug 2004 12:13:35 -0400
On Wed, 4 Aug 2004 17:57:26 +0200, "Maarten Wiltink"
<maarten@kittensandcats.net> wrote:
>>> Don't mess with standard Windows behaviour.
>>
>> Why not?
>
>Because people then have to learn about it before they can become
>productive again. I do not have much illusions about the skill
>level of the average user, but I'll be damned if I let the few who
>are worth working for be amputated like this.
Almost every program for windows uses subclassing... right click on this
message in OE, Agent, whatever and you're going to see a much larger than
normal edit menu, giving lots and lots of extra activities in addition to the
normal cut/copy/paste offered by the control. THAT is done by subclassing the
edit control, whether transparently by VCL tools or overtly in WinApi
programming it's the same thing.
Not only is subclassing common practice, it's *expected*... produce an
application with no subclassing at all and people will be asking you what's
wrong with the menus within a couple of hours. Others will be crabbing that
Enter doesn't lock text into an edit window or activate a pulldown list
selection... and on and on... all these things are done by subclassing.
>> Windows actually provides all the tools you need to modify the
>> behaviour of any of it's native controls... It's called subclassing
>> or superclassing (depending where you intercept message flow) and
>> it's intended to let you do exactly that.
>
>That it's possible doesn't necessarily make it a good idea.
But it's done, literally all the time.
I don't think I've ever written a single windows program (well, except
"HelloWorld") that hasn't subclassed at least one window.
-----
Laura
- Next message: J French: "Re: teaching a child - console or GUI"
- Previous message: Maarten Wiltink: "Re: How to do this. Search and list HD or CD?"
- In reply to: Maarten Wiltink: "Re: Preventing pasting in a TEdit"
- Next in thread: Jeremy Collins: "Re: Preventing pasting in a TEdit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|