Another point of view to consider here is that, in using ShellExecute, you're yielding to Windows to open the PDF in the registered application. It may be the default Reader in some OS. It may be FoxIt, as someone's already mentioned. It may be the full Adobe Suite, if someone has that installed. Or it may be CutePDF reader or PDFCreator. Or the VIP reader for the blind.
If you're dealing with an in-house app where you control the desktop, or if you ship a reader with your app, you may have more control to get the effect you want. But if you just want to launch "the reader" you might have to depend on the user to set things the way they would prefer.
On Mon, Apr 11, 2016 at 8:38 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
Thank you Fernando
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: 11 April 2016 13:35 To: profoxtech@leafe.com Subject: Re: ShellExecute window size ignored
Hi Paul:
The problem is that Adobe Reader is not a normal application, and do not respect normal messages.
I've found an awful hack, but seem to work:
http://superuser.com/questions/640174/how-to-start-adobe-reader-with-window-...
2016-04-11 13:27 GMT+02:00 Paul Newton Paul.Newton@pegasus.co.uk:
Thanks but I tried that and it still didn't work - it was another developer who wrote the code and assigned a numeric value to lcCallingWindow instead of lnCallingWindow
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]