Printer hDC -> Printer Name with WinAPI 
Author Message
 Printer hDC -> Printer Name with WinAPI

I'm trying to obtain the name of the current printer in a CommonDialog
control, but the control does not export the name as a property, only the
hDC.  Does anyone know a WinAPI function which will take the hDC as input
and somehow return the printer name?  I would use the VB Printer object, but
it does not function properly under NT4 due to an acknowledged bug.
Unfortunately, I have to use the printer name for what I want to accomplish,
because the third-party control I'm using (VideoSoft's VS-VIEW3) won't take

appreciated.

--
Mark Marinelli
Software Developer - Strategist Product Group
Kenan Systems Corporation
P: 617/528-4333

"In the beginning, the Universe was created. This has made a lot of people
very angry and has been widely regarded as a bad move." Douglas Adams, The
Hitchhiker's Guide to the Galaxy



Sun, 09 Dec 2001 03:00:00 GMT  
 Printer hDC -> Printer Name with WinAPI

Quote:

> I'm trying to obtain the name of the current printer in a CommonDialog
> control, but the control does not export the name as a property, only the
> hDC.  Does anyone know a WinAPI function which will take the hDC as input
> and somehow return the printer name?  I would use the VB Printer object, but
> it does not function properly under NT4 due to an acknowledged bug.
> Unfortunately, I have to use the printer name for what I want to accomplish,
> because the third-party control I'm using (VideoSoft's VS-VIEW3) won't take

> appreciated.

> --
> Mark Marinelli
> Software Developer - Strategist Product Group
> Kenan Systems Corporation
> P: 617/528-4333

> "In the beginning, the Universe was created. This has made a lot of people
> very angry and has been widely regarded as a bad move." Douglas Adams, The
> Hitchhiker's Guide to the Galaxy

The PrintDlg() function returns the printer driver name, device name,
and port name in a DEVNAMES structure, a handle to which is returned to
you in the hDevNames member of the PRINTDLG structure.

Norm



Sun, 09 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Printer hDC -> Printer Name with WinAPI

2. Printer hDC -> Printer Name with WinAPI

3. Using PrintDlg and getting hDC of named printer

4. Q: how to get text name of printer from hDC

5. BitBlitting from Picture.hDC to Printer.hDC

6. Changing Printer names (displayed names in printer folder)

7. Printer Control->Default Printer

8. Getting default printer name from Printers Collection

9. Printer.Font.Name and Printer.Font.Size problems with HP LaserJets

10. Extracting printer name from common printer dialogue control

11. Can't find printer-name when using Printer-Dialog (commdlg)

12. Extracting printer name from common printer dialogue control

 

 
Powered by phpBB® Forum Software