Click to See Complete Forum and Search --> : Need serious help: how to detect if a printer is connected or not


September 10th, 1999, 08:42 AM
Print gurus,

Lets try this again: How do I detect if a printer is connected or not. Already tried OpenPrinter() and GetPrinter() and both cannot detect if a printer is connected or not. Somebody point me to the right direction pls.

Sincerely,
Ted

James Longstreet
September 10th, 1999, 11:02 AM
here is some code

CPrintDialog dlg(true); // get default printer setup
dlg.GetDefaults();
DEVMODEA *pDevModeStruct = dlg.GetDevMode();
if( !pDevModeStruct )//if no devmode
EndDialog(0);//no printer setup



that will tell if there is a connected pritner