Article View: borland.public.cppbuilder.nativeapi
Article #12661Re: Subclassing an edit control (quite long post)
From: Gary Setter
Date: Thu, 27 Nov 2003 16:58
Date: Thu, 27 Nov 2003 16:58
27 lines
2161 bytes
2161 bytes
"Gary Setter" <setterg@worldnet.att.net> wrote in message news:3fc61f76@newsgroups.borland.com... > <snip> Now I'd like EditWindowProc to be a member function of tEdit so I can > > call some of tEdit's member functions. Is there any way to achieve this? > > (Static member functions could be a solutions, as there's momentarily > > exactly one instance of tEdit in the whole app. But if there's a way > > without using static member function I'd prefer that.) > > > > > > Thanks, > > Martin <snip> Sorry about my last post. I didn't notice that you are already doing, pretty much, what I suggested. Also, you are trying to create a client window, not sub-class a edit control from a resource. I see that your main window which is the frame for your edit window reserves memory for a pointer to a tWindow in wndclass.cbWndExtra = sizeof(tWindow*); But if you can't why not use Get/SetWindowLong(hWnd,GWL_USERDATA) ? That would let you use the same technique to tie that tEdit/tWindow object to the window handle in the static WndProc function. Best regards, Gary
Technical Details
Message-ID:
<3fc62d43@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3FC37DC6.8A69A621@gmx.de> <3fc39946@newsgroups.borland.com> <3FC4C880.15E477D2@gmx.de> <3fc61f76@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,7f8523ddb948f0d0 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-27 09:10:18 PST From: "Gary Setter" <setterg@worldnet.att.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <3FC37DC6.8A69A621@gmx.de> <3fc39946@newsgroups.borland.com> <3FC4C880.15E477D2@gmx.de> <3fc61f76@newsgroups.borland.com> Subject: Re: Subclassing an edit control (quite long post) Date: Thu, 27 Nov 2003 10:58:31 -0600 Lines: 31 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 12.74.20.84 Message-ID: <3fc62d43@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069952323 12.74.20.84 (27 Nov 2003 08:58:43 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail