🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to Move (Drag & Drop) a no-titlebar Window?

#9011
From: zoom
Date: Tue, 17 Aug 2004 09:38
46 lines
2354 bytes
class TMyForm : public TForm
{
private: // User declarations
public:  // User declarations
   __fastcall  TMyForm(TComponent* Owner);

void MyWM_NCHITTEST(TWMNCHitTest &Message);

BEGIN_MESSAGE_MAP
  MESSAGE_HANDLER(WM_NCHITTEST, TWMNCHitTest, MyWM_NCHITTEST);
END_MESSAGE_MAP(TForm);
};

void  TMyForm::MyWM_NCHITTEST(TWMNCHitTest &Message)
{
  TForm::Dispatch(&Message);
  if (Message.Result == HTCLIENT)
     Message.Result = HTCAPTION;
}

"PC Hua" <home-AT-huaonline.DOT.com> wrote in message
news:opscuulsqrpmxkmr@newsgroups.borland.com...
> I'm using a NOFRAME window of SDL-libraries. After I've googled and
> submitted my question to the SDL group and I still haven't got a solution,
> now I'm thinking of following solutions:
> 1) If I can dectect the drag action in the SDL-window can I tell the
> system (sending message) and pretend that the user is draging the
> titlebar, so that the system will start moving the window?
> 2) I allow user to select 'Move' from menu just like the system menu (at
> the window's corner).
>
> I think (1) is harder to implement or even not possible. In (2) I can use
> the system menu. My questions:
> 1) How can I access the system menu 'Move','Size' etc.?
> 2) When the cross appears after selecting 'Move', I have to press any
> arrow key. Then the window can be place by mouse pointer. Can this be done
> in the program?
>
> thanks
> Phuoc Can HUA
>
>
> -- 
> _/\__/\__/\__/\__/\__/\_
> www.folksfun.com
Technical Details
Message-ID: <4121d214$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <opscuulsqrpmxkmr@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c9d83d815dc3e377
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: <zoom>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <opscuulsqrpmxkmr@newsgroups.borland.com>
Subject: Re: How to Move (Drag & Drop) a no-titlebar Window?
Date: Tue, 17 Aug 2004 19:38:21 +1000
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 211.30.68.31
Message-ID: <4121d214$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1092735508 211.30.68.31 (17 Aug 2004 02:38:28 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail