Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-12 Thread Paul Breneman
On 11/12/2018 7:05 AM, Santiago A. wrote: El 02/11/18 a las 11:13, James escribió: I've been programming for decades with Pascal, starting with Turbo Pascal, and for a few years now with Freepascal, and even wrote really complicated console windows programs with Freepascal that do windows

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-12 Thread James
@lists.freepascal.org Subject: Re: [fpc-pascal] Windows programming tutorials for FPC This line: Writeln(GetSaveFileNameA(@TFilename)); What does it write when you select a file vs when you click x/cancel? :-):-) On 11/12/2018 4:31 AM, James wrote: > I've been using the example below to use the Save-as dia

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-12 Thread Alexander Grotewohl
anything. I'm not sure how this is normally done with GetSaveFileNameA. -Original Message- From: fpc-pascal On Behalf Of Alexander Grotewohl Sent: Sunday, November 4, 2018 11:48 AM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Windows programming tutorials for FPC

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-12 Thread Santiago A.
El 02/11/18 a las 11:13, James escribió: I've been programming for decades with Pascal, starting with Turbo Pascal, and for a few years now with Freepascal, and even wrote really complicated console windows programs with Freepascal that do windows function calls... But now I find that I would

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-12 Thread James
, November 4, 2018 11:48 AM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Windows programming tutorials for FPC Program TestGetSaveFileNameA; Uses windows, commdlg; Var TFilename : TOpenFileNameA; ret: array[0..100] of char; Begin

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread James
Thank you everyone who helped me with this. I have both the Lazarus version and the FPC console version both working with a Save-As dialog and message boxes for errors. Basic functionality is working great with both methods. Since it's such a simple program, I'll tinker with it with both

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread James
@lists.freepascal.org Subject: Re: [fpc-pascal] Windows programming tutorials for FPC Program TestGetSaveFileNameA; Uses windows, commdlg; Var TFilename : TOpenFileNameA; ret: array[0..100] of char; Begin Writeln('Start'); fillchar(TFileName, sizeof

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Martin Wynne
The Lazarus version is mostly working in Lazarus, but instead of everything happening before the form is loaded, is there a way I could make the form first, then just start processing everything, so that my messages I send to memo1 show up as it's processing? I'm guessing I need to move my

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Giuliano Colla
Il 03/11/2018 23:16, James ha scritto: It’s not a snippet, that’s the entire thing.   It’s pretty simple, just a sequential set of events to fix a file.  It would be a great help if you could get me an example of how to make this work. The simplest thing you can do is just to transform your

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Luca Olivetti
El 4/11/18 a les 17:29, James ha escrit: I used System.Assign and now I have my program working in Lazarus, I am exploring both options of making it a real windows application with Lazarus and a console program that can launch save-as. The Lazarus version is mostly working in Lazarus, but

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Bo Berglund
On Sun, 4 Nov 2018 11:29:23 -0500, "James" wrote: >The Lazarus version is mostly working in Lazarus, but instead of everything >happening before the form is loaded, is there a way I could make the form >first, then just start processing everything, so that my messages I send to > memo1 show up

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Alexander Grotewohl
('Finished'); Readln; End. -Original Message- From: fpc-pascal On Behalf Of Ewald Sent: Sunday, November 4, 2018 8:06 AM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Windows programming tutorials for FPC On 11/03/2018 09:04 PM, James wrote: So my question is, how can I

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread James
where I would move it to. Any suggestions? James Richters -Original Message- From: fpc-pascal On Behalf Of Luca Olivetti Sent: Saturday, November 3, 2018 6:15 PM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Windows programming tutorials for FPC El 3/11/18 a les 23:04

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread James
To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Windows programming tutorials for FPC On 11/03/2018 09:04 PM, James wrote: > So my question is, how can I use Ifilesavedialog with just FreePascal > in a console application? First off, the IFileSaveDialog is an interface, not a

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Ewald
On 11/03/2018 09:04 PM, James wrote: > So my question is, how can I use Ifilesavedialog with just FreePascal in > a console application? First off, the IFileSaveDialog is an interface, not a simple function. So, you'll need to: - Include the right units from freepascal (ActiveX and

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Sven Barth via fpc-pascal
Am Sa., 3. Nov. 2018, 23:56 hat Tomas Hajny geschrieben: > On Sat, November 3, 2018 23:04, James wrote: > > Thanks for the suggestion... > > > > I put my code in the OnCreate event as you suggested, but when I try to > > compile it, I get wrong number of parameters specified for call to > >

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread Tomas Hajny
On Sat, November 3, 2018 23:04, James wrote: > Thanks for the suggestion... > > I put my code in the OnCreate event as you suggested, but when I try to > compile it, I get wrong number of parameters specified for call to > Assign... my code worked before, and I have no idea what other parameters >

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread Luca Olivetti
El 3/11/18 a les 23:04, James ha escrit: Thanks for the suggestion... I put my code in the OnCreate event as you suggested, but when I try to compile it, I get wrong number of parameters specified for call to Assign... my code worked before, and I have no idea what other parameters it could

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread James
To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Windows programming tutorials for FPC On 11/3/2018 1:20 PM, James wrote: >And you can't just pop up a dialog window without having a window/form in the >first place. That’s probably my problem… My idea of just call

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread James
To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Windows programming tutorials for FPC El 3/11/18 a les 21:20, James ha escrit: > > I’ve been tinkering with Lazarus, and I managed to get a form with > some buttons based on the examples, and I did make one button open the >

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread Ralf Quint
On 11/3/2018 1:20 PM, James wrote: >And you can't just pop up a dialog window without having a window/form in the first place. That’s probably my problem…  My idea of just calling up the windows-API to get the save-as dialog probably won’t work without a form, even though I was able to get

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread Luca Olivetti
El 3/11/18 a les 21:20, James ha escrit: I’ve been tinkering with Lazarus, and I managed to get a form with some buttons based on the examples, and I did make one button open the save-as box… but I’m clueless on how to make the save-as box only come up when needed and by a programming

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread James
>And you can't just pop up a dialog window without having a window/form in the >first place. That’s probably my problem… My idea of just calling up the windows-API to get the save-as dialog probably won’t work without a form, even though I was able to get message boxes working >In

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread James
Thanks for the gersavefilenamea idea, I have used windows API function calls before in my Windows Console programs, so I thought I would try to get getsavefilenamea or ifilesavedialog to work in my console program. So I thought I would start small and get message boxes to work on my console

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread Ralf Quint
On 11/3/2018 7:00 AM, James wrote: That is correct, I have only ever done console programming, but now I find I'm lost trying to do any kind of GUI programming.    I have a very simple program that works as a console application, but what I would like to do is have it use the Windows "Save

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread Ewald
On 11/03/2018 03:00 PM, James wrote: > That is correct, I have only ever done console programming, but now I > find I'm lost trying to do any kind of GUI programming.    I have a very > simple program that works as a console application, but what I would > like to do is have it use the Windows

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread James
day, November 2, 2018 8:16 PM To: bo.bergl...@gmail.com; FPC-Pascal users discussions Subject: Re: [fpc-pascal] Windows programming tutorials for FPC On Sat, November 3, 2018 00:00, Bo Berglund wrote: > On Fri, 2 Nov 2018 06:13:40 -0400, "James" > &l

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-02 Thread Tomas Hajny
On Sat, November 3, 2018 00:00, Bo Berglund wrote: > On Fri, 2 Nov 2018 06:13:40 -0400, "James" > wrote: > >>I am wondering if there are any tutorials out there, hopefully specific >> to Freepascal and/or Lazarus. >>I need really basic stuff like how to open a message box, or how to use >>

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-02 Thread Bo Berglund
On Fri, 2 Nov 2018 06:13:40 -0400, "James" wrote: >I am wondering if there are any tutorials out there, hopefully specific to >Freepascal and/or Lazarus. >I need really basic stuff like how to open a message box, or how to use >windows file open, or save-as >dialog boxes.. etc.. even a hello

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-02 Thread Marcos Douglas B. Santos
On Fri, Nov 2, 2018 at 7:13 AM James wrote: > > I've been programming for decades with Pascal, starting with Turbo Pascal, > and for a few years now with Freepascal, and even wrote really complicated > console windows programs with Freepascal that do windows function calls... > But now I find