Support Forums > General Board

EZP a Print Control

<< < (3/4) > >>

Josť Roca:
Add also BYVAL or BYREF to the parameters that don't have it or anybody will get many warnings when compiling with the -w pedantic switch.

Also be careful with INTEGER (I have ended never using it). It is not the same that with PB. In FB, INTEGER evaluates as a LONG when compiling with the 32 bit compiler and to a LONGINT (QUAD) when compiling with 64-bit. The equivalent to PB's INTEGER is SHORT, and the equivalent to WORD is USHORT.

James Klutho:
Thanks for the feedback Jose.  The reason I used a dialog in EZP was that it was goal of the project to use a dialog that was not resource based.  I had never done that before.  I program pretty much for the heck of it.  One of these days I will no doubt get a high DPI system that will make catching these problems easier.   Misplacing the EZP_SetProcessDPIAware was a big OOPs as I was in a hurry.  I will correct it.  I will see what I can do to fix the dialog title.

Jim

Paul Squires:
The application that I just wrote used the libharu pdf library to output my reports to. I then shellexecute to open the pdf using whatever default pdf reader is installed on the system. Looking at your code and documentation I now realize that in the long run I may have been better off adapting your code to my application as I would then have total control over the whole report generation, displaying, and printing process. I will take a closer look at your code and see if I can adapt it for my use and at the same time provide any code upgrades that I may notice.

Paul Squires:
After looking through the code it gave me ideas on a different way to approach this print and print preview code.

I have prototype code working that creates each page via metafiles (CreateEnhMetaFile). Using this device independent approach I am able to send the GDI commands easily to the screen or printer (Charles Petzold actually had this code in the awesome "Programming Windows" book). It also allows creating everything in memory with having only one active device context so that there is not a substantial use of GDI resources. The non-current metafile pages can be saved as binary to a list and retrieved as needed. I guess it could be swapped to file as well. This appears to be the approach that the Virtual Print Engine (VPE) takes.

I am creating a class called CPrintPreview that EXTENDS CPrint (<-- that's Jose's class from his WinFBX library).

I'll keep plugging away at this and eventually post the final code when completed. It's pretty small and lightweight so far. My goal is to replace my dependence on the libharu pdf library that I am using in my application.

James Klutho:
Good luck on your print project.  I'm looking forward to seeing your class.  I'm glad EZP was good for something.  I am currently working on an ODBC wrapper with SQLightening syntax.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version