🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13877

Re: Windows Messages

#13877
From: Rodolfo Frino
Date: Sun, 14 Sep 2003 11:28
39 lines
1872 bytes
If you refer to the Msg parameter in the SendMessage API:

LRESULT SendMessage(
    HWND hWnd, // handle of destination window
    UINT Msg, // message to send
    WPARAM wParam, // first message parameter
    LPARAM lParam  // second message parameter
   );

the answer is no.

The Msg parameter must be a UINT.
For the particular Windows message  WM_CLOSE,  the value is defeined in
winuser.h
as 0x0010, in hexadecimal form.

#define WM_CLOSE      0x0010

However you can convert an AnsiString such as
    const AnsiString WMClose="WM_CLOSE";

using either a map or a function.

Rodolfo


<Endox .> wrote in message news:3f644108$1@newsgroups.borland.com...
>
> Hi
> Long time no post, could be good or bad:)
> Anyway, got a query:
> is it possible to convert an AnsiString straight into a windows message,
like
> AnsiString WMClose="WM_CLOSE";
> and then post the WMClose as the message. Or is this just impossible to
do?
>
> cheers
> Endox
Technical Details
Message-ID: <3f6450d6@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!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
References: <3f644108$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,11f0b5f44f7d7934
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-14 04:32:10 PST
From: "Rodolfo Frino" <rodolfofrino@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f644108$1@newsgroups.borland.com>
Subject: Re: Windows Messages
Date: Sun, 14 Sep 2003 21:28:33 +1000
Lines: 41
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: 203.206.30.194
Message-ID: <3f6450d6@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063538902 203.206.30.194 (14 Sep 2003 04:28:22 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!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