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

Mailing lists / fpc-pascal / 2008-09
19 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
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
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
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.
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.
I already found this and wanted to use it.
Unfortunalety, TBitmap.create is not recognized by the lazarus IDE (WinCE)
Paul
Paul wroteUnfortunalety, 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.
Please note that your post is ambiguous. It is not clear what API you are trying to use.…
The above won't do anything.
Use this:
Mouse.CursorPos:=Point(80,80);Mattias
Is the Graphics unit in your uses clause? TBitmap works in Windows CE, so there is…
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
On Sat, 13 Sep 2008 17:13:31 -0300 The above won't do anything. Use this:…
----- Original Message -----
From: "Mattias Gaertner"
> Mouse.CursorPos.X := 80; > Mouse.CursorPos.Y := 80;
this is accepted in the IDE
Mouse.CursorPos:=Point(80,80);
this isn't accepted
Paul
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
yes, it is var bmp: TBitmap; begin bmp:= TBitmap.Create; what's wrong with this? Paul
Please copy here your entire unit.
On Sat, 13 Sep 2008 22:44:43 +0200 Yes, because it is syntactically correct. But it only…
----- Original Message -----
From: "Mattias Gaertner"
What error do you get?
unit1.pas Fatal: syntax error ")" exptected but "," found (in point
(80,80));Paul
On Sat, 13 Sep 2008 22:44:43 +0200 Yes, because it is syntactically correct. But it only…
Cursorpos solved.
I had units InterfaceBase, LCLIntf, LCLType still in the uses clause.
Paul
I has unuts
----- Original Message ----- From: "Mattias Gaertner" unit1.pas Fatal: syntax error ")"…
You redefined Point somewhere.
TryClasses.Point
Mattias
Please copy here your entire unit. Felipe Monteiro de Carvalho
----- Original Message -----
Please copy here your entire unit. Felipe Monteiro de Carvalho
There are conflicts :
when I remove Windows from the uses clause, then TBitmap.create is OK. But then HDC is not anymore
Paul
Paul wrotewhen I remove Windows from the uses clause, then TBitmap.create is OK. But then HDC is not anymore
Try specifing Graphics.TBitmap
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
Move cursor in the bracket and press Ctrl+Shift+Space. Or use 'Find declaration' (Alt+Up) to jump to ReleaseDC and see its definition.
Mattias
The problem is too much ambiguity because the Windows unit declares a lot of stuff with the same names as LCL, so drop the Windows unit if you don't really need it and add LCLType and LCLIntf instead. Create a separate unit to isolate direct calls to the Windows API.