Article View: borland.public.cppbuilder.nativeapi
Article #13041Re: Want to change position of standard dialogs
From: Remy Lebeau (TeamB)
Date: Fri, 31 Oct 2003 07:51
Date: Fri, 31 Oct 2003 07:51
40 lines
2702 bytes
2702 bytes
"Rodolfo Frino" <rodolfowrvxg527u7qfrino@yahoo.com.jki> wrote in message news:3fa1fc23$1@newsgroups.borland.com... > I used it because Borland uses too. And how many times have Borland's examples and documentation been proven wrong? Too many times. > 1- In the OpenDialog1Show event handler the dimensions > of the first dialog are zero I did not notice earlier that you were shrinking the dialog to 0 dimensions. However, you should not just pick an arbitrary size for the new dimensions when re-displaying the dialog later. I ran your example, and upon re-showing the dialog, it took up half my screen, and half of the dialog was empty. Very ugly. Also, there's still no need to use FindWindow(), calling GetParent() on the OpenDialog's Handle returns the same HWND that FindWindow() would have found, and is a lot less error-prone to find the wrong window by accident :-) > Please, run the program and you will see that there is only one dialog > visible. My screen still flickers when I run your code. Whatever window is currently on top (including the desktop itself in case everything is minimized) when the dialog is displayed, it is repainted in full upon displaying the dialog. I'm still sticking with my earlier example, for a few extra lines of code it produced a cleaner effect for the user. > OpenDialog1 = new TOpenDialog(this); I am wondering, why do you keep showing examples that dynamically create everything at runtime instead of using the form designer at designtime? Gambit
Technical Details
Message-ID:
<3fa213d0$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-mailReferences:
<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> <3fa1f692$1@newsgroups.borland.com> <3fa1fc23$1@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-31 00:10:02 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> <3fa1f692$1@newsgroups.borland.com> <3fa1fc23$1@newsgroups.borland.com> Subject: Re: Want to change position of standard dialogs Date: Thu, 30 Oct 2003 23:51:27 -0800 Lines: 42 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: <3fa213d0$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067586512 67.22.137.75 (30 Oct 2003 23:48:32 -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