🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Positioning the window opened by ShellExecute()

#6653
From: Alan Bellingham
Date: Thu, 21 Apr 2005 17:38
34 lines
2221 bytes
"Vladimir Stefanovic" <antivari@po.sbb.co.yu> wrote:

>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:
>
>   int rc = (int) ShellExecute( Application->Handle,"open", Help.c_str(),
>                                NULL, NULL, SW_SHOWDEFAULT ) ;
>
>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...

It's the Windows Help Engine that should be obeying the flag, not your
code. You just tell it to start.

Alternately, do not use ShellExecute. Use the HtmlHelp API, which allows
you the control you want..

Alan Bellingham
-- 
Me <url:mailto:alanb@episys.com> <url:http://www.doughnut.demon.co.uk/>
ACCU - C, C++ and Java programming               <url:http://accu.org/>
The 2004 Discworld Convention                   <url:http://dwcon.org/>
Technical Details
Message-ID: <l4pf61d2lil1m87birrtkr4e37h5qlsee9@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4267b289@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1bac591bc979b6c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Alan Bellingham <alanb@episys.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Positioning the window opened by ShellExecute()
Date: Thu, 21 Apr 2005 18:38:48 +0100
Reply-To: alanb@episys.com
Message-ID: <l4pf61d2lil1m87birrtkr4e37h5qlsee9@4ax.com>
References: <4267b289@newsgroups.borland.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.49.31.105
X-Trace: newsgroups.borland.com 1114105127 62.49.31.105 (21 Apr 2005 10:38:47 -0800)
Lines: 34
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail