🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: drag and drop mouse

#17200
From: Jeff Kish
Date: Wed, 02 Apr 2003 18:54
57 lines
2765 bytes
On Thu, 27 Mar 2003 08:30:46 +1100, "Rodolfo Frino - Stargate
Software" <starcinema@eftel.com> wrote:

>You can create (or maybe display) a "box" (in this example a TRichEdit
>control)
>when the mouse goes down on your panel, and destroy (or maybe hide) the
>"box"
>when the mouse goes up on your panel (or held down and moved away from the
>panel
>and then released) by using the  event handlers corresponding to the
>OnMouseDown and OnMouseUp events:
>
>TRichEdit* p1;
>
>void __fastcall TForm1::Panel1MouseDown(TObject *Sender,
>      TMouseButton Button, TShiftState Shift, int X, int Y)
>{
>  if (Button == mbLeft)
>  {
>      // Create your component here
>      p1 = new TRichEdit(this);
>      p1->Parent = this;
>      //...
>  }
>}
>
>
>void __fastcall TForm1::Panel1MouseUp(TObject *Sender, TMouseButton Button,
>      TShiftState Shift, int X, int Y)
>{
>  if (Button == mbLeft)
>      delete p1;         // Destroy your component here
>
>}
>
>Rodolfo
>
>"Jeff Kish" <jeff.kish@mro.com> wrote in message
>news:ri448vcicvl3p405t80aohjaeancic9b93@4ax.com...
>> Greetings.
>>
>> Is there a code snippet appropriate for cbuilder that shows the best
>> way to display a image/wireframe/box/whatever when the user is
>> operating the mouse to select stuff (i.e. between the mouse down and
>> mouse up)?
>
Thanks for the reply. I am not sure I made myself clear, but  it seems
like this is a different way of approaching the problem.
I just want to be able to have a wire-frame box like so many apps do
when selecting an area to "select" or "zoom".

I was actually looking for a vcl friendly way to do this, or perhaps
find out if there was reasons the way I had mentioned were not
advisable.

Thanks again,
Jeff Kish
Technical Details
Message-ID: <rbcm8vk1g9gogcm64cn8tekimlnk3c6q4v@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <ri448vcicvl3p405t80aohjaeancic9b93@4ax.com> <3e8224ed$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,8f01a687cd3e32e5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-02 10:59:22 PST
From: Jeff Kish <jeff.kish@mro.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: drag and drop mouse
Date: Wed, 02 Apr 2003 13:54:39 -0500
Message-ID: <rbcm8vk1g9gogcm64cn8tekimlnk3c6q4v@4ax.com>
References: <ri448vcicvl3p405t80aohjaeancic9b93@4ax.com> <3e8224ed$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 208.44.113.190
X-Trace: newsgroups.borland.com 1049309678 208.44.113.190 (2 Apr 2003 10:54:38 -0800)
Lines: 57
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail