🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Positioning the window opened by ShellExecute()

#6652
From: Vladimir Stefanovic
Date: Thu, 21 Apr 2005 14:03
34 lines
1751 bytes
Hi,

I want to open the Help file (di.chm) by ShellExecute().
How can I influence to the window position and size?

This is my code:

   AnsiString Help = ExtractFilePath( ParamStr(0) ) + "\\" + "di.chm";

   int rc = (int) ShellExecute( Application->Handle,"open", Help.c_str(),
                                NULL, NULL, SW_SHOWDEFAULT ) ;
   if ( rc <= 32 )
   {
      // etc ...


In Win32API Help it says:

<quote>
   SW_SHOWDEFAULT Sets the show state based on the SW_ flag
   specified in the STARTUPINFO structure passed to the CreateProcess
   function by the program that started the application. An application
   should call ShowWindow with this flag to set the initial show state of 
its
   main window.
<quote>

But I do not know how to use that...



-- 
Best regards,
Vladimir Stefanovic 
Technical Details
Message-ID: <4267b289@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1bac591bc979b6c,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Positioning the window opened by ShellExecute()
Date: Thu, 21 Apr 2005 16:03:01 +0200
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 82.117.212.65
Message-ID: <4267b289@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1114092169 82.117.212.65 (21 Apr 2005 07:02:49 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail