Hi all,
We have a requirement to display multiple status messages at a
time like “Busy-Out of Paper” in the printer queue and printer icon. For
displaying in printer icon we are using Setprinter API. The code that we
are using is
SetPrinter(hPrinter1,0,(BYTE *)(PRINTER_STATUS_BUSY |
PRINTER_STATUS_PAPER_OUT),PRINTER_CONTROL_SET_STATUS);
Here we are getting status message as “Out of paper-Busy” in the printer
icon, but our requirement is to display it as “Busy-Out of Paper”. We
tried like this also
SetPrinter(hPrinter1,0,(BYTE *)(PRINTER_STATUS_PAPER_OUT |
PRINTER_STATUS_BUSY),PRINTER_CONTROL_SET_STATUS);
but it gives the same result. Is there any solution to display it like
“Busy-Out of Paper”.
Thanks in advance,
Karunya Lakshmi
You’re passing a bitmask. The order of operands for operator| doesn’t make a difference in the end result.
–
Ken Johnson (Skywing)
Windows SDK MVP
http://www.nynaeve.net
wrote in message news:xxxxx@ntdev…
Hi all,
We have a requirement to display multiple status messages at a time like “Busy-Out of Paper” in the printer queue and printer icon. For displaying in printer icon we are using Setprinter API. The code that we are using is
SetPrinter(hPrinter1,0,(BYTE *)(PRINTER_STATUS_BUSY | PRINTER_STATUS_PAPER_OUT),PRINTER_CONTROL_SET_STATUS);
Here we are getting status message as “Out of paper-Busy” in the printer icon, but our requirement is to display it as “Busy-Out of Paper”. We tried like this also
SetPrinter(hPrinter1,0,(BYTE *)(PRINTER_STATUS_PAPER_OUT | PRINTER_STATUS_BUSY),PRINTER_CONTROL_SET_STATUS);
but it gives the same result. Is there any solution to display it like “Busy-Out of Paper”.
Thanks in advance,
Karunya Lakshmi