🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: listview redraw problem

#10262
From: Martin Nijhoff
Date: Tue, 11 May 2004 10:12
22 lines
1493 bytes
A simple way to move a captionless form by clicking anywhere in the form, is
to handle the OnMouseDown event of the form like this:

void __fastcall TForm1::FormMouseDown (TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y)
{
    // Check if left mouse button pressed and form not maximized.
    if (Button == mbLeft && WindowState != wsMaximized)
    {
        // Release mouse capture.
        ReleaseCapture();

        // Simulate a click on 'Move' item in the form's system menu.
        Perform(WM_SYSCOMMAND, SC_MOUSEMOVE, 0);
    }
}

Hope this helps.

Regards,

Martin Nijhoff
Technical Details
Message-ID: <40a0a6e1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <406a670b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,7897366892743d08
X-Google-Attributes: gid10cc67,public
From: "Martin Nijhoff" <dont@mail.me>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <406a670b$1@newsgroups.borland.com>
Subject: Re: listview redraw problem
Date: Tue, 11 May 2004 12:12:17 +0200
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 80.100.129.156
Message-ID: <40a0a6e1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1084270305 80.100.129.156 (11 May 2004 03:11:45 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail