Need serious help: how to detect if a printer is connected or not
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
Re: Need serious help: how to detect if a printer is connected or not
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