🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to use traditional Windows message and API function ?

#641
From: Asger Joergensen
Date: Tue, 12 Feb 2008 07:51
34 lines
2037 bytes
Hi nick 
 
 nick says:
> 
> (1) Receiving a message in application.
> (2) I want application receiving a message and then display 
> some kind of infomation. I can do that in traditional Windows 
> API program but don't know how to do it in C++ builder. Thanks.

In adition to what Dennis wrote.
You can find the definations of the VCL messages in Messages.hpp, 
using the right message structure usually gives nicer code when 
using the message. 
  
e.g.
void __fastcall TMyPanel::WMMouseMove(Messages::TWMMouse &Msg)
{
   TPanel::Dispatch((void*)&Msg);
   //do things with Msg.XPos or Msg.YPos
}

Dispatch is used to make sure that the message is passed on to 
the ancestor. I most cases You must use Dispatch otherwise things
don't work correctly.       



P.s. Please manually breake Your text lines, due to code lines
most of us have turned of auto linebreak, which makes it hard
to read when people don't break lines.

Kind regards
Asger
Technical Details
Message-ID: <MPG.221b6e643d745c66989a61@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <47b02ecf$1@newsgroups.borland.com> <MPG.221a525c60a3d10c989a5f@newsgroups.borland.com> <47b0d385$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,985e142ee2266c4
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Asger Joergensen <junk@Asger-P.dk>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: How to use traditional Windows message and API function ?
Date: Tue, 12 Feb 2008 08:51:26 +0100
Message-ID: <MPG.221b6e643d745c66989a61@newsgroups.borland.com>
References: <47b02ecf$1@newsgroups.borland.com> <MPG.221a525c60a3d10c989a5f@newsgroups.borland.com> <47b0d385$1@newsgroups.borland.com>
Organization: Asger-P
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: 83.73.220.89
X-Trace: newsgroups.borland.com 1202802806 83.73.220.89 (11 Feb 2008 23:53:26 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail