Re: [Lazarus] TFileStream

2009-01-29 Thread Dave Coventry
= snip === case ftype of 43://'+' begin FS:=TFileStream.Create(fname, fmshareDenyWrite); Try FS.Seek(pos,soFromBeginning); FS.ReadBuffer(fldheader[0],4); increm:=LEtoN(PLongInt(fldheader)^)+1; for m:=0 to 3

Re: [Lazarus] TFileStream

2009-01-29 Thread Michael Van Canneyt
On Thu, 29 Jan 2009, Dave Coventry wrote: = snip === case ftype of 43://'+' begin FS:=TFileStream.Create(fname, fmshareDenyWrite); Try FS.Seek(pos,soFromBeginning); FS.ReadBuffer(fldheader[0],4);

Re: [Lazarus] TFileStream

2009-01-29 Thread Paul Ishenin
Dave Coventry wrote: ... FS:=TFileStream.Create(fname, fmshareDenyWrite); ... I am trying to read a block of 4 bytes, increment it by one and write it back again. However, if fails on the write. Please read carefully what have you written: FS := TFileStream.Create(fname,

[Lazarus] How I add elements into a colums of TKOLListView with several colums?

2009-01-29 Thread User
Is this possible? Best regards. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] fsStayOnTop under windows

2009-01-29 Thread Luca Olivetti
En/na Henry Vermaak ha escrit: 2009/1/28 Luca Olivetti l...@wetron.es: En/na Henry Vermaak ha escrit: Very funny, but it's not the case at hand: I just need the windows of my application to always stay on top to the windows of another application. I can do it in delphi and lazarus/qt, I just

Re: [Lazarus] fsStayOnTop under windows

2009-01-29 Thread Luca Olivetti
En/na JoshyFun ha escrit: Affected file is win32callback.inc Thanks, that was exactly what I had in mind. It works beautifully. Now you must control the StayOnTop using the HWND_TOPMOST and the setwindowlong. Setting fsStayOnTop seems to be enough. Bye -- Luca Olivetti Wetron

[Lazarus] Drawing text in WinCE

2009-01-29 Thread Paul van Helden
Hi All, I'm new to Lazarus having decided to switch from Delphi for a WinCE project. I'm stumped though. Labels on forms display garbage characters. Having spent a whole two days learning about Lazarus internals, Unicode, Widestrings, etc., I'm now pulling out my hair and the project cannot

Re: [Lazarus] Drawing text in WinCE

2009-01-29 Thread John vd Waeter
Paul van Helden wrote: Hi All, I'm new to Lazarus having decided to switch from Delphi for a WinCE project. I'm stumped though. Labels on forms display garbage characters. Having spent a whole two days learning about Lazarus internals, Unicode, Widestrings, etc., I'm now pulling out my

Re: [Lazarus] fsStayOnTop under windows

2009-01-29 Thread JoshyFun
Hello Hans-Peter, Thursday, January 29, 2009, 3:51:03 AM, you wrote: HV so what happens if the other application wants to be on top of yours? In Windows at least, topmost windows are implemented as a second windows layer, one for normal windows and other for topmost ones. HPD Which Windows

Re: [Lazarus] Drawing text in WinCE

2009-01-29 Thread Felipe Monteiro de Carvalho
It works for me ... it's a rather wierd problem ... TLabel not working? What Lazarus version are you using? How did you install support for wince? Do you have a screenshot of the problem? Also, are your source files UTF-8 encoded? If you start a new project, put only a label in the form and

[Lazarus] ptInRect question

2009-01-29 Thread Michael Van Canneyt
Hi, I have a question regarding the following function: function PtInRect(const Rect : TRect;const p : TPoint) : Boolean; begin PtInRect:=(p.y=Rect.Top) and (p.yRect.Bottom) and (p.x=Rect.Left) and (p.xRect.Right); end; Is there a reason why the top/left

[Lazarus] Interact with M$ Word

2009-01-29 Thread Bart
Currently I'm working on an app that needs to interact with M$ Word. The intended users are computer noobs, so I expect no knowledge from them whatsoever. Problem. My app calculates/compose tabular data (in the order of 6 cols x 50 rows). These data have to be inserted into a word document as a

Re: [Lazarus] ptInRect question

2009-01-29 Thread dmitry boyarintsev
Delphi rectangles are used to wrap Win32 GDI calls. here's a quote from msdn FillRect function: -= start quote =- When filling the specified rectangle, FillRect does not include the rectangle's right and bottom sides. GDI fills a rectangle up to, but not including, the right column and bottom

Re: [Lazarus] ptInRect question

2009-01-29 Thread dmitry boyarintsev
AFAIK, Delphi compat.Here's the delphi code from Types unit. function PtInRect(const Rect: TRect; const P: TPoint): Boolean; begin Result := (P.X = Rect.Left) and (P.X Rect.Right) and (P.Y = Rect.Top) and (P.Y Rect.Bottom); end; ___ Lazarus

Re: [Lazarus] ptInRect question

2009-01-29 Thread Michael Van Canneyt
On Fri, 30 Jan 2009, dmitry boyarintsev wrote: AFAIK, Delphi compat.Here's the delphi code from Types unit. function PtInRect(const Rect: TRect; const P: TPoint): Boolean; begin Result := (P.X = Rect.Left) and (P.X Rect.Right) and (P.Y = Rect.Top) and (P.Y Rect.Bottom); end; I

[Lazarus] Canvas clipping ?

2009-01-29 Thread Michael Van Canneyt
Hi, Is TCanvas clipping supported ? I set cliprect, but nothing happens... Michael. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] ptInRect question

2009-01-29 Thread dmitry boyarintsev
I found this out already, but why, what is the rationale ? i have only one thought, about the reason for this: if you follow the Microsoft GDI rules, then you'll get width := r.Right - r.Left; otherwise (if r.Right is also filled then drawn), you'll end-up with additional operation width :=

Re: [Lazarus] Interact with M$ Word

2009-01-29 Thread tiziano de togni
Bart ha scritto: Currently I'm working on an app that needs to interact with M$ Word. The intended users are computer noobs, so I expect no knowledge from them whatsoever. ... Anyone got some suggestions or knows a good place to start looking. Mind you, I'm really just a basic-stuff

[Lazarus] KeyDown Bugs ?

2009-01-29 Thread Darmawan Sugiarto
I have a problem Look at this code procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState ); begin   Key:=0; end; In this code, Edit1.Text still empty string but If I change the code like this procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift:

Re: [Lazarus] ptInRect question

2009-01-29 Thread Graeme Geldenhuys
On Fri, Jan 30, 2009 at 12:11 AM, Michael Van Canneyt mich...@freepascal.org wrote: function PtInRect(const Rect : TRect;const p : TPoint) : Boolean; begin PtInRect:=(p.y=Rect.Top) and (p.yRect.Bottom) and (p.x=Rect.Left) and (p.xRect.Right); end; Is