[fpc-pascal] WinCE api calls info
Hi, where can I find a list of available api calls for WinCE/Arm ? I need to make a screenshot, set the cursor postion and inject keypresses. thanks, Paul ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
Found some in InterfaceBase; docs are very hard to find for a starter though . Why doesn't TBitmap.Create exist in WinCE? I'm trying to take a screenshot.. Paul - Original Message - From: "Paul" <[EMAIL PROTECTED]> To: "FPC-Pascal users discussions" Sent: Saturday, September 13, 2008 4:50 PM Subject: [fpc-pascal] WinCE api calls info Hi, where can I find a list of available api calls for WinCE/Arm ? I need to make a screenshot, set the cursor postion and inject keypresses. thanks, Paul ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
> where can I find a list of available api calls for WinCE/Arm ? Please note that your post is ambiguous. It is not clear what API you are trying to use. In the first post it seams to be the Windows CE API developed by Microsoft, which you can find searching in google for the following example string: site:msdn2.microsoft.com GetWindow CE In the second post it seams that you are talking about the Lazarus APIs, which are documented in the wiki and here: http://wiki.lazarus.freepascal.org/Lazarus_Documentation http://lazarus-ccr.sourceforge.net/docs/lcl/ > I need to . set the cursor postion uses Forms; Mouse.CursorPos.X := 80; Mouse.CursorPos.Y := 80; > Why doesn't TBitmap.Create exist in WinCE? Of course it exists. It's in the Graphics unit and it is part of Lazarus. You need to install Lazarus to use it, not just Free Pascal. > I'm trying to take a screenshot.. For most platform you can use this: http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Taking_a_screenshot_of_the_screen I don't know if it works on Windows CE. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
http://lazarus-ccr.sourceforge.net/docs/lcl/ thanks for this link. Why doesn't TBitmap.Create exist in WinCE? Of course it exists. It's in the Graphics unit and it is part of Lazarus. You need to install Lazarus to use it, not just Free Pascal. is installed this way. http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Taking_a_screenshot_of_the_screen I already found this and wanted to use it. Unfortunalety, TBitmap.create is not recognized by the lazarus IDE (WinCE) Paul ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
On Sat, Sep 13, 2008 at 5:18 PM, Paul <[EMAIL PROTECTED]> wrote: > Unfortunalety, TBitmap.create is not recognized by the lazarus IDE (WinCE) Is the Graphics unit in your uses clause? TBitmap works in Windows CE, so there is something wrong with your code. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
On Sat, 13 Sep 2008 17:13:31 -0300 "Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]> wrote: > > where can I find a list of available api calls for WinCE/Arm ? > > Please note that your post is ambiguous. It is not clear what API you > are trying to use. In the first post it seams to be the Windows CE API > developed by Microsoft, which you can find searching in google for the > following example string: > > site:msdn2.microsoft.com GetWindow CE > > In the second post it seams that you are talking about the Lazarus > APIs, which are documented in the wiki and here: > > http://wiki.lazarus.freepascal.org/Lazarus_Documentation > > http://lazarus-ccr.sourceforge.net/docs/lcl/ > > > I need to . set the cursor postion > > uses Forms; > > Mouse.CursorPos.X := 80; > Mouse.CursorPos.Y := 80; The above won't do anything. Use this: Mouse.CursorPos:=Point(80,80); Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
Is the Graphics unit in your uses clause? yes, it is TBitmap works in Windows CE, so there is something wrong with your code. var bmp: TBitmap; begin bmp:= TBitmap.Create; what's wrong with this? thanks, Paul ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
- Original Message - From: "Mattias Gaertner" <[EMAIL PROTECTED]> Mouse.CursorPos.X := 80; Mouse.CursorPos.Y := 80; this is accepted in the IDE Mouse.CursorPos:=Point(80,80); this isn't accepted Paul ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
On Sat, 13 Sep 2008 22:44:43 +0200 "Paul" <[EMAIL PROTECTED]> wrote: > > - Original Message - > From: "Mattias Gaertner" <[EMAIL PROTECTED]> > >> Mouse.CursorPos.X := 80; > >> Mouse.CursorPos.Y := 80; > > this is accepted in the IDE Yes, because it is syntactically correct. But it only changes some temporary stack variables. Nothing will happen. > > Mouse.CursorPos:=Point(80,80); > this isn't accepted What error do you get? procedure TMainForm.Button1Click(Sender: TObject); begin Mouse.CursorPos:=Point(80,80); end; Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
Please copy here your entire unit. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
- Original Message - From: "Mattias Gaertner" <[EMAIL PROTECTED]> What error do you get? unit1.pas Fatal: syntax error ")" exptected but "," found (in point (80,80)); Paul ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
On Sat, 13 Sep 2008 23:04:49 +0200 "Paul" <[EMAIL PROTECTED]> wrote: > > - Original Message - > From: "Mattias Gaertner" <[EMAIL PROTECTED]> > > > What error do you get? > unit1.pas Fatal: syntax error ")" exptected but "," found (in > point (80,80)); You redefined Point somewhere. Try Classes.Point Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
Cursorpos solved. I had units InterfaceBase, LCLIntf, LCLType still in the uses clause. Paul I has unuts - Original Message - From: "Mattias Gaertner" <[EMAIL PROTECTED]> To: Sent: Saturday, September 13, 2008 10:57 PM Subject: Re: [fpc-pascal] WinCE api calls info On Sat, 13 Sep 2008 22:44:43 +0200 "Paul" <[EMAIL PROTECTED]> wrote: - Original Message - From: "Mattias Gaertner" <[EMAIL PROTECTED]> >> Mouse.CursorPos.X := 80; >> Mouse.CursorPos.Y := 80; this is accepted in the IDE Yes, because it is syntactically correct. But it only changes some temporary stack variables. Nothing will happen. > Mouse.CursorPos:=Point(80,80); this isn't accepted What error do you get? procedure TMainForm.Button1Click(Sender: TObject); begin Mouse.CursorPos:=Point(80,80); end; Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
- Original Message - From: "Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]> To: "FPC-Pascal users discussions" Sent: Saturday, September 13, 2008 11:01 PM Subject: Re: [fpc-pascal] WinCE api calls info Please copy here your entire unit. {$mode objfpc}{$H+} {.$smartlink on} {.$DEFINE RELEASE} {.$FPC_LINK_SMART} interface uses Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, windows; type { TForm1 } TForm1 = class(TForm) Button1: TButton; Button2: TButton; Image1: TImage; Label1: TLabel; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { private declarations } public { public declarations } end; var Form1: TForm1; implementation { TForm1 } procedure captureScreen; var MyBitmap: TBitmap; ScreenDC: HDC; begin MyBitmap := TBitmap.create; ScreenDC := GetDC(0); MyBitmap.LoadFromDevice(ScreenDC); ReleaseDC(ScreenDC); end; procedure TForm1.Button2Click(Sender: TObject); begin Mouse.CursorPos:= point(10, 10); // WidgetSet.setcursorpos(10, 10); // uses InterfaceBase end; ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
There are conflicts : when I remove Windows from the uses clause, then TBitmap.create is OK. But then HDC is not anymore Paul - Original Message - From: "Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]> To: "FPC-Pascal users discussions" Sent: Saturday, September 13, 2008 11:01 PM Subject: Re: [fpc-pascal] WinCE api calls info Please copy here your entire unit. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
On Sat, Sep 13, 2008 at 6:17 PM, Paul <[EMAIL PROTECTED]> wrote: > when I remove Windows from the uses clause, then TBitmap.create is OK. > But then HDC is not anymore Try specifing Graphics.TBitmap -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE api calls info
Already done, uses Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, windows; procedure captureScreen; var MyBitmap: Graphics.TBitmap; ScreenDC: HDC; begin MyBitmap := Graphics.TBitmap.Create; try Mybitmap.Canvas.CopyMode:= cmSrcInvert; //OK ScreenDC := GetDC(0); MyBitmap.LoadFromDevice(ScreenDC); . finally ReleaseDC(ScreenDC); <-- error wrong number of parameters end; end; I haven't found what the parameters have to be this way Paul - Original Message - From: "Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]> To: "FPC-Pascal users discussions" Sent: Sunday, September 14, 2008 12:11 AM Subject: Re: [fpc-pascal] WinCE api calls info On Sat, Sep 13, 2008 at 6:17 PM, Paul <[EMAIL PROTECTED]> wrote: when I remove Windows from the uses clause, then TBitmap.create is OK. But then HDC is not anymore Try specifing Graphics.TBitmap -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Unable to authenticate to update entry in "contributed units"
Hi, I just added an entry to "contributed units" (Kambi VRML game engine). Of course, two seconds later I wanted to correct it. But I can't --- looks like I cannot authenticate. And it seems it's a bug, not my bad memory. When I input my current (both now and at the time of submitting the entry) community username (just my email, "[EMAIL PROTECTED]") and passwd, the system answers "No user match Warning: Authentication failed. Sorry, but the password you provided doesn't match the password in the database. " Funny thing is, when I really input wrong password or username, the answer is different: I get "Username not known in community system, please create an account first, or verify password" So it looks like it did recognize my correct password at some point, but then went bad? Of course, I can login to community site with my password. It may be important to mention that a couple of minutes before submitting to "contributed units" I actually changed my email and password on community. I tried updating on "contributed units" with both my old and new passwords, and none works. While I'm at it, some more issues with "contributed units" that I want to mention: 1. No email was generated, neither to fpc-announce nor to my private email. But I left both checkboxes "on" ("Send me a mail with confirmation.", and "Send a mail to the announcement mailing list.") when submitting my entry. 2. Could we please get more space in the "File URL:" field? It's currently limited to 80 characters (which is actually what I wanted to correct in my particular entry, I pasted the URL and it got cut to 80 characters, cutting of ".gz" extension from the URL and making it invalid). Regards, Michalis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Unable to authenticate to update entry in "contributed units"
On 14 Sep 2008, at 00:25, Michalis Kamburelis wrote: 1. No email was generated, neither to fpc-announce nor to my private email. But I left both checkboxes "on" ("Send me a mail with confirmation.", and "Send a mail to the announcement mailing list.") when submitting my entry. fpc-announce is fully moderated, so you cannot immediately know whether or not a mail was sent to it. That said, no mail was sent to it indeed (it's actually been quite a long time since the last mail that was sent by the contributed units script to the fpc-announce list). Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for FreeBSD AMD64?
Marco van de Voort writes: Should I try to build it in a FBSD i386 or AMD64? I built in on x86, but assembled and linked on AMD64. Are the steps documented somewhere? I downloaded fpc-2.2.2.i386-freebsd.tar How would I "build" Also, when one uses instal.sh, how does one uninstall? In a "regular" install I would just use the port system. I created a VM just to play around.. so I can rever the snapshot, but wonder what is the procedure to uninstall. Is this what I should be looking at? http://wiki.freepascal.org/Release_engineering Is the AMD64 version for FreeBSD planned to be worked on anytime in the near future? I have to get a program done soon and looking at the wiki/Release_engineering it seems it would take me a good deal of time even trying to figure out how to begin to help to move the AMD64 port along. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] DateTimeToFileDate
> Zitat von Carsten Bager <[EMAIL PROTECTED]>: > > > When I do this > > > > Free Pascal Compiler version 2.2.2 [2008/07/29] for i386 > > Which OS? Linux > > > - > > Program tt; > > uses dos, > > sysutils; > > > > function strPackTime(t:longWord):shortstring; > > var > > dt:Datetime; > > begin > > UnpackTime(t,dt); > > strPackTime:=intToStr(dt.day)+'/'+ > > intToStr(dt.month)+'-'+ > > intToStr(dt.year)+ > > intToStr(dt.hour)+':'+ > > intToStr(dt.min)+':'+ > > intToStr(dt.sec)+' '; > > end; > > > > Begin > > WriteLn(strPackTime(DateTimeToFileDate(now))); > > > > WriteLn(DateTimeToStr(FileDateToDateTime(DateTimeToFileDate(now > > ; > > End. > > - > > > > I get this result > > > > 9/6-20160:28:22 > > 11-9-08 13:39:55 > > > > What am I doing wrong. > > > Mattias > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal