Print Bitmap using Windows GDI

andrew_knapp

New Member
Hi,

I'm trying to find some sample Progress code for loading a bitmap file into memory and printing it using Windows GDI calls. I have looked at the Win32 API WIKI and searched the PEG and cannot find anything.

Any suggestions :confused:

Thanks
 
I don't think Progress supports GDI printing directly.

See eg.

KB P24553


GOAL:
When is Progress going to be able to work with GDI printers?
FIX:
At this point in time, Progress does not work with the Windows GDI
Interface and hence, it cannot output data to GDI printers. Progress
is currently looking into the implementation of this technology into
the product. However, it has not yet been decided when this feature
will be implemented.

KB P12601

Windows
SYMPTOM(s):
Attempting to output data from Progress to a GDI printer.
The data does not even get sent to the printer spool.
Progress cannot output data via GDI.
CAUSE:
GDI (Graphical Device Interface) is an API developed by Microsoft that
most Windows applications use to display images on a monitor. GDI
printers only accept Windows GDI commands. They are not accessible via
a published standard protocol, like the standard printer languages
PostScript, ESC/P, and HP PCL. They are exclusively accessible via a
proprietary protocol.
FIX:
Ask the printer's manufacturer to provide the printer with a standard
printer language support.

I've seen some GDI examples on the Peg before, which may contradict that first entry, but can't remember if printing was involved.
 
Assuming it is not possible directly, you should be able to hijack a process that can print Bitmaps, eg. Word, and commandeer that.
 

andrew_knapp

New Member
Thanks for your replies. I have seen the "printscreen" code but it doesn't show how to load the bitmap from a file before printing. I already have a routine created using the example "printfile.p" on the Win32 API to print a text print but I also need to show a bitmap logo as well.
 
Top