🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Windows Messages

#13876
From: Remy Lebeau (TeamB)
Date: Sun, 14 Sep 2003 11:05
27 lines
1836 bytes
<Endox .> wrote in message news:3f644108$1@newsgroups.borland.com...

> 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.

Not like you have shown, no.  You would have to set up your own lookup table
to map a a string to the appropriate numeric value.  An STL map container
would be good for that, ie:

    #include <map>

    std::map<AnsiString, UINT> MsgMap;

    MsgMap["WM_CLOSE"] = WM_CLOSE;
    //...
    SendMessage(hWnd, MsgMap["WM_CLOSE"], 0, 0);


Gambit


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
Technical Details
Message-ID: <3f644b3d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!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
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:09:15 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f644108$1@newsgroups.borland.com>
Subject: Re: Windows Messages
Date: Sun, 14 Sep 2003 04:05:21 -0700
Lines: 29
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: 207.175.226.26
Message-ID: <3f644b3d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063537469 207.175.226.26 (14 Sep 2003 04:04:29 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!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