Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

Check if chosed printer do color

Hi folks,

I would like to check if the chosed printer in the print dialog box is set on
color or not. It the printer dont support color, it is not. It it supports color,
it can be set to grayscale or color. I have tried with DEVMODE / dmColor,
but I think I am doing wrong. Please tell me what parameter I should check.

Thanks in advance, Tomas
0
tko092397
Asked:
tko092397
  • 2
1 Solution
 
ArkadiyCommented:
GetDeviceCaps(dc, NUMCOLORS) > 2 || GetDeviceCaps(dc, NUMCOLORS worked for me when I needed to distinguish btw real color and monochrome prnters. I am not sure how to detect grayscaling, try
GetDeviceCaps(dc, BITSPIXEL) == 1
or
GetDeviceCaps(dc, PLANES) == 1
when you look for monochrome printer that does not support grayscale

0
 
tko092397Author Commented:
Thanx. Exellent.
0
 
ArkadiyCommented:
The condition in the answer should look as follows:

GetDeviceCaps(dc, NUMCOLORS) > 2 || GetDeviceCaps(dc, NUMCOLORS) < 0
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now