device name for printer hDc
Posted on 1999-07-02
I know this should be simple, but I have yet to figure it out.
I am using the Printer Common Dialog box to set the printer and return a device context (hDc) to use in printing with a third party tool. I don't want to set the printer default to the selected printer, just use the hDc. I would also like to be able to display the printer device name, orientation, etc., for the user after the hDc has been selected. The common dialog box has an orientation property I can read, but I have yet to find a way to tell the calling program what printer was selected. The Printer.DeviceName property still shows the default printer settings, as expected, but now that I have an hDc, how do I know what device is associated with it?