Article View: borland.public.cppbuilder.nativeapi
Article #17146Mapping to user-defined Windows Message
From: Gerald O'Brien
Date: Mon, 07 Apr 2003 16:42
Date: Mon, 07 Apr 2003 16:42
30 lines
2010 bytes
2010 bytes
I have defined a RegisteredWindowsMessage like this:
static const UINT UWM_U_R_ME =
::RegisterWindowMessage("UWM_U_R_ME-5B76225D-E886-4ce1-BE1F-A983F759EC8A");
Now I need to map the message in the application that is to receive it.
The Help File example looks like this:
#define CM_CHANGECOLOR (WM_APP + 400)
...
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(CM_CHANGECOLOR, TMessage, CMChangeColor)
END_MESSAGE_MAP(TControl)
but that is for a constant message not a Registered Windows Message.
The mapping line in the example I have been reading looks like this:
ON_REGISTERED_MESSAGE(UWM_U_R_ME, OnURMe)
but that causes a compiler error in BCB 4.0, undefined funtion. Can
anybody tell me how to map correctly a Registered Windows Message?
The full problem is to keep the instances of an MDI application to one
but still open as new child windows any files that may be clicked on by
the user. If anyone knows the source of any example of this, then that
would be much appreciated.
As always, all suggestions gratefully received.
Technical Details
Message-ID:
<3e91aa4b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,7914e0c3bd2d5c6d,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-07 09:50:09 PST Date: Mon, 07 Apr 2003 17:42:32 +0100 From: Gerald O'Brien <gob@the-ideas-organiser.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en, en-us MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Mapping to user-defined Windows Message Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.177.9.64 Message-ID: <3e91aa4b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1049733707 80.177.9.64 (7 Apr 2003 09:41:47 -0800) Lines: 31 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail