🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Want to change position of standard dialogs

#13038
From: Rodolfo Frino
Date: Fri, 31 Oct 2003 05:33
51 lines
2619 bytes
There is an easier way if you clear the options ;)

TOpenDialog* OpenDialog1;
String DlgTitle;
HWND H;

//--------------------------------------------------------------------------
-
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
    //CREATE OPENDIALOG  --------------------------------------------
    OpenDialog1  = new TOpenDialog(this);
    OpenDialog1->Title = "This is the Title";
    DlgTitle = OpenDialog1->Title;
    OpenDialog1->OnShow = OpenDialog1Show;
    OpenDialog1->OnSelectionChange = OpenDialog1SelectionChange;
    OpenDialog1->Options.Clear();
}
//--------------------------------------------------------------------------
-

void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
    OpenDialog1->FileName = "doc.c";

    if (OpenDialog1->Execute())
    {
        // Place your code here
    }
}
//--------------------------------------------------------------------------
-

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

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

"Programming is the art of picking a needle out of a hayheap."  Rodolfo,
2003
Technical Details
Message-ID: <3fa1f406@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!news-han1.dfn.de!news-fra1.dfn.de!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: <3FA01311.62845116@uni-trier.de> <3fa19d6a@newsgroups.borland.com> <3fa1a188$1@newsgroups.borland.com> <3fa1b607$1@newsgroups.borland.com> <3fa1d558@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 21:39:00 PST
From: "Rodolfo Frino" <rodolfowrvxg527u7qfrino@yahoo.com.jki>
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>
Subject: Re: Want to change position of standard dialogs
Date: Fri, 31 Oct 2003 16:33:13 +1100
Lines: 55
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: 203.206.17.146
Message-ID: <3fa1f406@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1067578374 203.206.17.146 (30 Oct 2003 21:32:54 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!news-han1.dfn.de!news-fra1.dfn.de!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail