Article View: borland.public.cppbuilder.nativeapi
Article #8036Re: Help needed in Type Casting
From: FireHead
Date: Wed, 24 Nov 2004 02:45
Date: Wed, 24 Nov 2004 02:45
50 lines
2763 bytes
2763 bytes
Ed Mulroy [TeamB] wrote: > I wrote: > > >>>You specified a member function of a structure to >>>Windows as a callback function. Windows is not >>>party to the internal configuration of your program >>>and has no facilities to call a non static member >>>function in the context of whatever instance of that >>>structure you intended to be used. > > > You replied: > > >>If you have got Borland C++ 4.02 or greater and Look >>for windows examples; it exactly contradicts you >>statement. > > > That is not true. > > You described a problem and asked what is wrong. I told > you what was wrong. > > Go to your books on C++. Investigate what they say about > function pointers to non-static member functions and how > they are different from function pointers to normal, > non-member functions. > > You are trying to specify a non-static member function > as the window procedure address in the lpfnWndProc > element of a WNDPROC structure. The line generates an > error because what is assigned to the element is not of > the same type. The address of a non-static member > function involves not only the address of the function > code but also that of the instance of the structure or > class of which it is a member. The lpfnWndProc variable > is not a compatible type to the address of a non-static > member functon of a class or structure. > > . Ed > > >>FireHead <satishA82@linuxmail.org> wrote: > > Thanks for the explaination. It was very useful.
Technical Details
Message-ID:
<41a3f5a8@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41a13964@newsgroups.borland.com> <41a17387$1@newsgroups.borland.com> <41a26c56@newsgroups.borland.com> <41a361d0$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,874f410c864356cd X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 24 Nov 2004 13:45:41 +1100 From: FireHead <satishA82@linuxmail.org> User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Help needed in Type Casting References: <41a13964@newsgroups.borland.com> <41a17387$1@newsgroups.borland.com> <41a26c56@newsgroups.borland.com> <41a361d0$1@newsgroups.borland.com> In-Reply-To: <41a361d0$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 202.78.34.81 Message-ID: <41a3f5a8@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1101264296 202.78.34.81 (23 Nov 2004 18:44:56 -0700) Lines: 50 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail