🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Want to change position of standard dialogs

#13039
From: Remy Lebeau (TeamB)
Date: Fri, 31 Oct 2003 05:46
44 lines
2881 bytes
"Rodolfo Frino" <rodolfowrvxg527u7qfrino@yahoo.com.jki> wrote in message
news:3fa1f406@newsgroups.borland.com...
> There is an easier way if you clear the options ;)

What do the Options have to do with anything?  The option settings that are
enabled by default are ofHideReadOnly and ofEnableSizing, neither of which
effect the dialog's ability to be moved.

>     OpenDialog1->Options.Clear();

You cannot clear the Options like that.  You are modifying a temporary
value, not the original property value.  Just like with other Set
operations, you need to use the '=' assignment operation instead, ie:

    OpenDialog1->Options =  TOpenOptions();

> void __fastcall TForm1::OpenDialog1Show(TObject *Sender)
> {
>       H = FindWindow(NULL, DlgTitle.c_str());
>       MoveWindow(H, 0, 0, 0, 0, false);
> }

I have already determined that you cannot move the dialog from the OnShow
event. That is why my earlier example had to delay the movement.  OnShow is
triggered during the handling of the WM_INITDIALOG message, however
TOpenDialog internally repositions the dialog during the handling of the
CDN_INITDONE notification later on, thus cancelling out any movements you do
in the OnShow event.

> void __fastcall TForm1::OpenDialog1SelectionChange(TObject *Sender)
> {
>     MoveWindow(H, 0, 0, 800, 300, true);
> }

I guess you missed the point  of my earlier example - the OnSelectionChange
event is triggered well after the dialog has become visible, so the user
sees the dialog appear in the middle of the screen and then move to the
coordinates seconds later.  Which even you said earlier was an ugly effect
:-p  Thus my use of disabling the dekstop's ability to update the screen
while the dialog is being moved, so the user won't see it happen.


Gambit
Technical Details
Message-ID: <3fa1f692$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3FA01311.62845116@uni-trier.de> <3fa19d6a@newsgroups.borland.com> <3fa1a188$1@newsgroups.borland.com> <3fa1b607$1@newsgroups.borland.com> <3fa1d558@newsgroups.borland.com> <3fa1f406@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,5023092a61a6c0b9
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-30 22:09:04 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3FA01311.62845116@uni-trier.de> <3fa19d6a@newsgroups.borland.com> <3fa1a188$1@newsgroups.borland.com> <3fa1b607$1@newsgroups.borland.com> <3fa1d558@newsgroups.borland.com> <3fa1f406@newsgroups.borland.com>
Subject: Re: Want to change position of standard dialogs
Date: Thu, 30 Oct 2003 21:46:38 -0800
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.137.75
Message-ID: <3fa1f692$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1067579026 67.22.137.75 (30 Oct 2003 21:43:46 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail