Author Topic: WinCE progress  (Read 21981 times)


  • Hero Member
  • *****
  • Posts: 529
RE: Re: RE: Re: RE: WinCE progress
« Reply #15 on: June 17, 2006, 08:03:57 pm »
Update: the thread seems to be running fine this way! But I can't really test since now file operations are very unstable.

I've got a TStringList, and I use LoadFromFile to load a text file (path correct). One should think that this is simple - but every second time or so, I get an EFOpenError exception - every other time it just loads. I replaced the mystringlist.LoadFromFile with a filestream that I opened with fmOpenRead and fmOpenShareDenyNone, and then used mystringlist.LoadFromStream, but this also throws an exception every second time.

At least this problem did not happen when I used the full Lazarus version ;)

Code: [Select]
procedure TMyApp.DoLoadButton;
var sl: TStringList;
    i: integer;
   sl := TStringList.Create;
   for i := 0 to Pred(sl.Count)
    do AddListBoxItem(hList,sl[i]);

* DoLoadButton is an event handler called when pressing a button on the form
* AddListBoxItem is my mini frameworks function to add strings to a ListBox, and works on other buttons
* test.txt is an existing file, the error message shows the correct path:

An unhandled exception occured at $000.....: EFOpenError: Unable to open file "\Storage Card\test\test.txt" $000.....

At the same time, using AssignFile, Reset, Read, CloseFile works - so there's probably some kind of problem in higher level file routines!

(update: submitted a bug to the bugtracker, category RTL, with a most simplified test application)


  • Hero Member
  • *****
  • Posts: 529
RE: Re: RE: Re: RE: WinCE progress
« Reply #16 on: June 23, 2006, 09:50:37 pm »
Just to update for those who use the search function ;) :
The file bug was already fixed in Subversion, and for getting real fullscreen, there's this function:

Code: [Select]

function SHFullScreen(hwmdRequester: hWnd; dwState: DWord): WINBOOL; external UserDLLAyg name 'SHFullScreen';

I guess it should be in a future version of ;)

This allows to use the two buttons at the bottom created by SHCreateMenuBar (with SHFullScreen and the appropriate parameters, they will only show on smartphones, not regular devices).


TinyPortal © 2005-2018