Article View: borland.public.cppbuilder.nativeapi
Article #10767Re: BCB6 custom message handler
From: Remy Lebeau (TeamB)
Date: Wed, 24 Mar 2004 18:09
Date: Wed, 24 Mar 2004 18:09
23 lines
1865 bytes
1865 bytes
"Uriah Liggett" <uriahliggett@crosswinds.net> wrote in message
news:4061bf1f@newsgroups.borland.com...
> [C++ Error] frmMsgHndlr.h(36): E2219 Wrong number of
> arguments in call of macro 'MESSAGE_HANDLER'
Are you, by chance, using the ATL in your project? The ATL has its own
MESSAGE_HANDLER macro which is not compatible with the MESSAGE_HANDLER that
you are trying to use. Which is why the VCL has a separate
VCL_MESSAGE_HANDLER macro for this purpose:
VCL_MESSAGE_HANDLER( UPDATE_GUI_PRIMARY_HOST, TMessage,
UpdateGUIPrimaryHost )
VCL_MESSAGE_HANDLER does all of the actual work for a VCL message map. When
ATL is not used, MESSAGE_HANDLER is just a #define for VCL_MESSAGE_HANDLER.
But when ATL is used, MESSAGE_HANDLER is the ATL's MESSAGE_HANDLER, not the
VCL's. As such, you should always use VCL_MESSAGE_HANDLER when putting a
message map into a VCL class, then you don't have to worry about this issue.
Gambit
Technical Details
Message-ID:
<4061cca5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4061bf1f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,1ed9217ae15d9e69 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-03-24 10:01:02 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4061bf1f@newsgroups.borland.com> Subject: Re: BCB6 custom message handler Date: Wed, 24 Mar 2004 10:09:36 -0800 Lines: 25 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.138.253 Message-ID: <4061cca5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1080151205 67.22.138.253 (24 Mar 2004 10:00:05 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail