Solved

Check if chosed printer do color

Posted on 1998-08-06
3
255 Views
Last Modified: 2013-11-19
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
Comment
Question by:tko092397
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Arkadiy earned 100 total points
ID: 1320304
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
 

Author Comment

by:tko092397
ID: 1320305
Thanx. Exellent.
0
 
LVL 1

Expert Comment

by:Arkadiy
ID: 1320306
The condition in the answer should look as follows:

GetDeviceCaps(dc, NUMCOLORS) > 2 || GetDeviceCaps(dc, NUMCOLORS) < 0
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question