comp.lang.ada
 help / color / mirror / Atom feed
* GetOpenFilename
@ 1999-04-15  0:00 Boulais, Jeffrey M
  1999-04-16  0:00 ` GetOpenFilename dennison
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Boulais, Jeffrey M @ 1999-04-15  0:00 UTC (permalink / raw)


I am trying to use GetOpenFilename to get an open file dialong.  I have code
that work fine under gnat 3.04
( using -gnatp ) that doesn't work now under gnat3.11 (w/o -gnatp).  I was
previously using an unchecked
conversion of the first character of a string to a Win32.LPSTR for the
lpstrFile field.  Now this causes the
open file dialog to not display.  If I use a dummy variable defined of type
Win32.LPSTR, the dialog opens
fine, but I can't get the filename from the LPSTR type to a standard String.
I also tries assigning the LPSTR
variable the unchecked conversion of the string, and that made it stop
working as well.

Does anyone have suggestions for this type of thing?  Greatly appreciated...



   -**** Posted from RemarQ, http://www.remarq.com/?a ****-
 Search and Read Usenet Discussions in your Browser - FREE -




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GetOpenFilename
  1999-04-15  0:00 GetOpenFilename Boulais, Jeffrey M
@ 1999-04-16  0:00 ` dennison
  1999-04-16  0:00 ` GetOpenFilename Stephen Leake
  1999-04-19  0:00 ` GetOpenFilename David Botton
  2 siblings, 0 replies; 4+ messages in thread
From: dennison @ 1999-04-16  0:00 UTC (permalink / raw)


In article <4AsR2.646$dd.256779@WReNphoon3>,
  jboulais@sikorsky.com (Boulais, Jeffrey M) wrote:
> I am trying to use GetOpenFilename to get an open file dialong.  I have code
> that work fine under gnat 3.04
> ( using -gnatp ) that doesn't work now under gnat3.11 (w/o -gnatp).  I was
> previously using an unchecked
> conversion of the first character of a string to a Win32.LPSTR for the
> lpstrFile field.  Now this causes the
> open file dialog to not display.  If I use a dummy variable defined of type
> Win32.LPSTR, the dialog opens
> fine, but I can't get the filename from the LPSTR type to a standard String.
> I also tries assigning the LPSTR

If you could post the code chunk that has the problem, you might be able to
get better responses.

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GetOpenFilename
  1999-04-15  0:00 GetOpenFilename Boulais, Jeffrey M
  1999-04-16  0:00 ` GetOpenFilename dennison
@ 1999-04-16  0:00 ` Stephen Leake
  1999-04-19  0:00 ` GetOpenFilename David Botton
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Leake @ 1999-04-16  0:00 UTC (permalink / raw)


jboulais@sikorsky.com (Boulais, Jeffrey M) writes:

> I am trying to use GetOpenFilename to get an open file dialong.  I have code
> that work fine under gnat 3.04
> ( using -gnatp ) that doesn't work now under gnat3.11 (w/o -gnatp).  I was
> previously using an unchecked
> conversion of the first character of a string to a Win32.LPSTR for the
> lpstrFile field.  Now this causes the
> open file dialog to not display.  If I use a dummy variable defined of type
> Win32.LPSTR, the dialog opens
> fine, but I can't get the filename from the LPSTR type to a standard String.
> I also tries assigning the LPSTR
> variable the unchecked conversion of the string, and that made it stop
> working as well.
> 
> Does anyone have suggestions for this type of thing?  Greatly appreciated...

You'll have to post the code to get a real answer.

Or just download Windex
(http://www.erols.com/leakstan/Stephe/index.html), and use
Windex.Common_Dialogs.File.Open_Dialog, which does all the nasty
conversions for you, leaving you with a nice clean Ada interface.

-- Stephe




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GetOpenFilename
  1999-04-15  0:00 GetOpenFilename Boulais, Jeffrey M
  1999-04-16  0:00 ` GetOpenFilename dennison
  1999-04-16  0:00 ` GetOpenFilename Stephen Leake
@ 1999-04-19  0:00 ` David Botton
  2 siblings, 0 replies; 4+ messages in thread
From: David Botton @ 1999-04-19  0:00 UTC (permalink / raw)
  To: Boulais, Jeffrey M

There is an example of using the GetOpenFileName function on the Ada
Source Code Treasury:

http://www.botton.com/ada

The example is located under the OS section:

Using the Open File Common Dialog Box
http://www.botton.com/ada/os/win32-opencmdlg.html

There are many other examples there that you may find of interest. New
examples are always on the hunt, so let me know if you have any thing
interesting.

David Botton

"Boulais, Jeffrey M" wrote:
> 
> I am trying to use GetOpenFilename to get an open file dialong.  I have code
> that work fine under gnat 3.04
> 
> ( using -gnatp ) that doesn't work now under gnat3.11 (w/o -gnatp).  I was
> previously using an unchecked
> 
> conversion of the first character of a string to a Win32.LPSTR for the
> lpstrFile field.  Now this causes the
> 
> open file dialog to not display.  If I use a dummy variable defined of type
> Win32.LPSTR, the dialog opens
> 
> fine, but I can't get the filename from the LPSTR type to a standard String.
> I also tries assigning the LPSTR
> 
> variable the unchecked conversion of the string, and that made it stop
> working as well.
> 
> Does anyone have suggestions for this type of thing?  Greatly appreciated...
> 
>    -**** Posted from RemarQ, http://www.remarq.com/?a ****-
>  Search and Read Usenet Discussions in your Browser - FREE -




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-04-19  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-15  0:00 GetOpenFilename Boulais, Jeffrey M
1999-04-16  0:00 ` GetOpenFilename dennison
1999-04-16  0:00 ` GetOpenFilename Stephen Leake
1999-04-19  0:00 ` GetOpenFilename David Botton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox