From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a3914332df5b6ff9 X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: GetOpenFilename Date: 1999/04/16 Message-ID: #1/1 X-Deja-AN: 467161372 References: <4AsR2.646$dd.256779@WReNphoon3> Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Newsgroups: comp.lang.ada Date: 1999-04-16T00:00:00+00:00 List-Id: 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