Article View: borland.public.cppbuilder.nativeapi
Article #621Re: Form Move
From: Asger Joergensen
Date: Sat, 09 Feb 2008 14:10
Date: Sat, 09 Feb 2008 14:10
41 lines
1633 bytes
1633 bytes
Hi bar
bar says:
> Hello all
> One quick question
>
> Is there any way to know, just before a form is moving.
> I need to perform some action before a form is moved from its last place.
>
> Thanks
> SA
in the class:
void __fastcall WMWindowPosChanging(TMessage& Msg);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_WINDOWPOSCHANGING, TMessage, WMWindowPosChanging)
END_MESSAGE_MAP(TForm)
int the cpp file:
void __fastcall TForm1::WMWindowPosChanging(TMessage& Msg)
{
TForm::Dispatch((void*)&Msg);
LPWINDOWPOS LpWp = (LPWINDOWPOS)Msg.LParam;
//LpWp->cx;
//LpWp->cy;
}
//-------------------------------------------------------
or You can overide the SetBounds:
virtual void __fastcall SetBounds(int L, int T, int W, int H);
Kind regards
Asger
Technical Details
Message-ID:
<MPG.2217d2dd8d951dea989a5a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<47ad8f68@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,271a211e1db5ddd 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: Form Move Date: Sat, 9 Feb 2008 15:10:55 +0100 Message-ID: <MPG.2217d2dd8d951dea989a5a@newsgroups.borland.com> References: <47ad8f68@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 1202566252 83.73.220.89 (9 Feb 2008 06:10:52 -0700) Lines: 41 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail