Forum > PDAs and Smartphones

WinCE progress

<< < (3/4) > >>

First, my environment: I updated my steps to install the arm-wince (did a fresh installation today), and even created a batch file that will do everything after downloading and extracting the three necessary archives; see the User:CCRDude page of the wiki.

For testing command lines, I tried both PPC Command Shell and PocketCmd+PocketConsole, along with the most simple test.pas from the wiki.

* Microsoft Device Emulator 2.0 Preview using Microsoft Windows Mobile 5.0 MSFP Emulator Images: test-wince.exe without one of the above installed just tells me "A critical component is either missing or cannot start"; same with console.dll copied into the Windows folder. But since even PocketCMD itself won't work, I'm not sure if it has anything to do with that.

* Compaq iPAQ H3870 running PocketPC 2002 (WinCE 3.0): i compiled test.pas anew with todays installation, but still the same effect: the hourglass appears and keeps rotating forever (meaning hours!), and after that I can't use the File Explorer (or PocketCmd if I started it from there) until I do a soft reset of the device.

Looking into the data segment of the compiled files, they've been using FPC 2.1.1 [2006/06/10] for arm - WinCE (last installation, 32 bit Windows and machine) as well as [2006/06/17] (this installation, 64 bit Windows and machine). But cause the same error.

Win API sounds good, too. Like in the good old TPWin days when there was no Delphi yet :D But if I can't even get a provided test console app to run (imho someone mentioned the same problem in another topic), I doubt I would get an API-based GUI application to work  :cry:


--- Quote from: "CCRDude" ---...
But if I can't even get a provided test console app to run (imho someone mentioned the same problem in another topic), I doubt I would get an API-based GUI application to work  :cry:
--- End quote ---

I mentioned it, but I did subsequently manage to get the test console app to work. If you use the Lazarus Freepascal Program template, then add the  apptype console directive, it works (tested on my WM2003 ipaq 3850, haven't tested on the emulator). I haven't checked what makes the difference, but I suspect it's the {$mode objfpc}.

Edit: I just checked, all that's needed is to add the {$mode objfpc} directive.

--- Code: ---
program test;

{$mode objfpc}{$H+}
{$apptype console}

  {$IFDEF UNIX}{$IFDEF UseCThreads}
  { add your units here };

  Str: string;
  WriteLn('Software Developed with:');
  WriteLn('The Free Pascal Compiler');
  WriteLn('Please, enter your name:');
  WriteLn('Your name is: ' + Str);

--- End code ---

Very interesting! Your file compiled with ppcrossarm test.pas still does not work, but using the Lazarus IDE to compile it, I get a file of the same size that works. Thanks a lot, I can now start trying some small GUI-API things and a test case for threads :)

Ok, good that the compiler works =)

Another IDE for quickly building GUI app with Free Pascal + Windows CE:

Apparently Roozbeh is porting KOL from Delphi to FPC+WinCE. KOL is a lightweight library to build gui apps, googling around you can find more info about it.

We can talk to him about how KOL port is progressing.

I just took one of my own light-weight projects (creating a few controls and a message queue isn't that difficult :D ) and compiled it for CE. I was stuck for a few moments until I noticed that TWndClass may not use hCursor and lpszMenuName on CE, and CreateFontIndirect was not supported, but then it simply ran :)

The only minor annoyance is that the UI looks a bit "older" than the rest; the device is only CE 3.0, but stil, the Close button in the title bar in normal apps is an X in a round circle, in this simple app it's in a grey box. It does show the "correct" close button on the emulator (Mobile 5.0) though.
The window not the style I was looking at (same as File Explorer - not moving the Start menu to the bottom), but I guess that's part of the style parameter used in CreateWindow - I'll have to find out what is the "usual" setting on CE there (the SDK help isn't helpful regarding that - I thought I should use WS_EX_NODRAG, but that just returns an error that it cannot create a top-level child window - well, I'll find out :) ).

Anyway, now that I've got that running, I can see about the threads :)


[0] Message Index

[#] Next page

[*] Previous page

Go to full version