Article View: borland.public.cppbuilder.nativeapi
Article #13053Re: CallWindowProc compile problem
From: Remy Lebeau (TeamB)
Date: Fri, 31 Oct 2003 19:29
Date: Fri, 31 Oct 2003 19:29
25 lines
1726 bytes
1726 bytes
"Jan" <jan@jlcsoft.com> wrote in message
news:3fa272d6$1@newsgroups.borland.com...
> But I get the next errors when I try to compile:
> Cannot convert 'void *' to 'int(__stdcall *)()
You need to cast the pointer you have to the window procedure. Since
CallWindowProc() uses either WNDPROC or FARPROC depending on the presence of
STRICT, you could use a custom define to make the coding easier, ie:
#ifdef STRICT
#define MYWNDPROC WNDPROC
#else
#define MYWNDPROC FARPROC
#endif
MYWNDPROC oldProc =
(MYWNDPROC)SetWindowLong((HWND)MyChilds[iPV].lChildWindow,
GWL_WNDPROC,(LONG)(HandleWindowMessage));
//...
return CallWindowProc(oldProc, hwndDlg, uMsg, wParam, lParam);
Gambit
Technical Details
Message-ID:
<3fa2b753$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fa272d6$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,dce1be079b294b08 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-31 11:39:51 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fa272d6$1@newsgroups.borland.com> Subject: Re: CallWindowProc compile problem Date: Fri, 31 Oct 2003 11:29:05 -0800 Lines: 27 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: 67.22.137.75 Message-ID: <3fa2b753$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067628371 67.22.137.75 (31 Oct 2003 11:26:11 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail