🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17223

Intercepting/Hooking all print messages for the printers

#17223
From: Zack Wickes
Date: Sun, 30 Mar 2003 01:01
17 lines
1513 bytes
Hi,

I need to have my program hook into Windows such that I know when any print
job (from any and all process spaces) is sent to a printer and how many
pages the job is.

I started down the path of installing a global windows hook using a dll with
SetWindowsHookEx(), but now I am not sure what message to intercept since
WM_PRINT seems to be called whenever a GDI object needs to print itself onto
an HDC.... besides - I dont see any access to a structure that contains the
information I need about the number of pages in the job as a result of the
WM_PRINT message......

All help appreciated.
Builder 6.

Zack.
Technical Details
Message-ID: <3e863ee4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2d32dd90788cc57f,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-29 16:51:25 PST
From: "Zack Wickes" <zwicks@home.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Intercepting/Hooking all print messages for the printers
Date: Sat, 29 Mar 2003 17:01:06 -0800
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 24.84.53.193
Message-ID: <3e863ee4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1048985316 24.84.53.193 (29 Mar 2003 16:48:36 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail