EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Can you just query for the current default printer and go from there.
 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
Originally posted by: EagleKeeper
Can you just query for the current default printer and go from there.

Well sure, I could use CreateDC() to get a DC on the default printer, but that wouldn't affect anything when the end user clicks file->print in my IE window.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Originally posted by: Alphathree33
Originally posted by: EagleKeeper
Can you just query for the current default printer and go from there.

Well sure, I could use CreateDC() to get a DC on the default printer, but that wouldn't affect anything when the end user clicks file->print in my IE window.

I am not familiar with the use of an ActiveX Control, however, my theory would be that if you have the user clicking print, then you will then prepare the output to the DC just like a normal program would.
 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
Okay here's what I've got right now:

- A network printer installed on my box as a local printer
- I can click "Printing preferences" in control panel->printer and see the orientation and duplex settings

Now, I have a C++ program and I want to go into those printer settings and change htem so that the next time I go to the control panel, I see my changes.

The following does NOT work:

OpenPrinter(..)
DocumentProperties() to get current DEVMODE settings
Modify DEVMODE
DocumentProperties() to set the new DEVMODE settings
ClosePrinter(...)

I go to control panel and there are no changes.