Re: subclassing edit control and preventing copy paste clipboard
"domehead100" <[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
--- In [email protected], "amante1il" <is.aviv@...> wrote: > BUT I do think there should be some other better way to do that ... > Deriving directly from CEdit, or adding CEdit the SubclassWindow procedure. > Or even some functions with in CEdit to do it ... > Best regards, > Don Well, I disagree. The thing about the design of ATL/WTL windowing is "you pay only for what you use". This means you have the standard control wrappers like CEdit that allow you to manipulate the target control. They are extremely lightweight and the only variable (memory) they require is the window handle. You don't always want to subclass every control, so why pay for it if you're not going to use it? If you want to subclass a control, you use/derive from CWindowImpl, which uses templates to set up the inheritance at compile time rather than runtime (highly efficient), and then you get the power of reacting to the events (messages) related to the control, but you also pay a price of additional member variables, code, window procedure thunking, etc. Overall it's quite a good design and quite easy to use once you get used to it (sometimes a bit of a challenge initially coming from MFC, which is a poor design but is a highly documented poor design :o)). ~Mike ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/