Printpreview with XE2

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

Printpreview with XE2

Postby Jens01 » September 3rd, 2011, 11:29 am

I checked PrintPreview with a trialversion of Delphi XE2.
After changing this methods in preview.pas it works :
Code: Select all
procedure TIntegerList.LoadFromStream(Stream: TStream);
var
  Size: Integer;
begin
  Clear;
  Stream.ReadBuffer(Size, SizeOf(Integer));
  Count := Size;
  Stream.ReadBuffer(Pointer(List)^{List^}, Count * SizeOf(Integer));
end;

procedure TIntegerList.SaveToStream(Stream: TStream);
var
  Size: Integer;
begin
  Size := Count;
  Stream.WriteBuffer(Size, SizeOf(Integer));
  Stream.WriteBuffer(Pointer(List)^{List^}, Count * SizeOf(Integer));
end;
Jens01
Active Member
Active Member
 
Posts: 19
Joined: December 10th, 2010, 12:10 pm

Re: Printpreview with XE2

Postby Kambiz » September 3rd, 2011, 3:31 pm

Thank you for the information.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: Printpreview with XE2

Postby Jens01 » September 3rd, 2011, 6:51 pm

But only for 32-Bit Windows
Jens01
Active Member
Active Member
 
Posts: 19
Joined: December 10th, 2010, 12:10 pm

Re: Printpreview with XE2

Postby Kambiz » September 4th, 2011, 12:03 pm

I don't have XE to check it out, but I guess by changing SizeOf(Integer) to SizeOf(Pointer) it will work on 64-bit too.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: Printpreview with XE2

Postby Jens01 » September 4th, 2011, 1:48 pm

64-Bit:
I changed it but there come some exception. Perhaps it is a problem with the DLLs, e.g. gdiplus.dll
Jens01
Active Member
Active Member
 
Posts: 19
Joined: December 10th, 2010, 12:10 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 0 guests

cron